File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
samples/nextjs-postgres/app/src/app Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,12 @@ const client = new Client({
9
9
database : process . env . POSTGRES_DB ,
10
10
password : process . env . POSTGRES_PASSWORD ,
11
11
port : parseInt ( process . env . POSTGRES_PORT ! , 10 ) ,
12
+ // We have to connect with SSL when we deploy, but we want to allow self-signed certificates
12
13
ssl : process . env . POSTGRES_SSL === 'true' ? { rejectUnauthorized : false } : false ,
13
14
} ) ;
14
15
15
16
// Only connect if we actually have the password
17
+ // This prevents a connection error during build time (since we don't have access to the DB during build)
16
18
const connection = process . env . POSTGRES_PASSWORD ? client . connect ( ) : Promise . resolve ( ) ;
17
19
18
20
function parseIPv6MappedIPv4 ( ip : string | null ) {
You can’t perform that action at this time.
0 commit comments