File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ require('dotenv').config()
44const config = require ( './knexfile.js' )
55const knexModule = require ( 'knex' )
66
7- const env = process . env . NODE_ENV ? process . env . NODE_ENV : 'not working'
7+ const { NODE_ENV } = process . env
8+ const env = NODE_ENV === 'staging' ? 'production' : NODE_ENV || 'not working'
9+
810let knex
911
1012module . exports . getKnex = ( ) => {
Original file line number Diff line number Diff line change @@ -39,7 +39,12 @@ module.exports = {
3939 } ,
4040 production : {
4141 client : 'pg' ,
42- connection : config . DATABASE_URL ,
42+ connection : {
43+ connectionString : config . DATABASE_URL ,
44+ ssl : {
45+ rejectUnauthorized : false
46+ }
47+ } ,
4348 useNullAsDefault : true ,
4449 migrations : {
4550 directory : './src/db/migrations'
You can’t perform that action at this time.
0 commit comments