File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 5
5
"main" : " index.js" ,
6
6
"scripts" : {
7
7
"start" : " node src/server.js" ,
8
- "predeploy" : " npm audit" ,
8
+ "predeploy" : " npm audit && npm run migrate-production " ,
9
9
"deploy" : " git push heroku master" ,
10
10
"test" : " mocha --require test/setup.js" ,
11
11
"migrate" : " postgrator --config postgrator-config.js" ,
12
+ "migrate-production" : " postgrator --config postgrator-production-config.js" ,
12
13
"dev" : " nodemon src/server.js"
13
14
},
14
15
"keywords" : [],
Original file line number Diff line number Diff line change
1
+ require ( 'dotenv' ) . config ( ) ;
2
+
3
+ module . exports = {
4
+ "migrationDirectory" : "migrations" ,
5
+ "driver" : "pg" ,
6
+ "host" : process . env . PROD_MIGRATION_DB_HOST ,
7
+ "port" : process . env . PROD_MIGRATION_DB_PORT ,
8
+ "database" : process . env . PROD_MIGRATION_DB_NAME ,
9
+ "username" : process . env . PROD_MIGRATION_DB_USER ,
10
+ "password" : process . env . PROD_MIGRATION_DB_PASS ,
11
+ "ssl" : true
12
+ }
Original file line number Diff line number Diff line change @@ -7,6 +7,6 @@ module.exports = {
7
7
CLIENT_SECRET : process . env . CLIENT_SECRET ,
8
8
9
9
CLIENT_ORIGIN : process . env . CLIENT_ORIGIN || 'http://localhost:3000' ,
10
- DB_URL : process . env . DB_URL || 'postgresql://tunechainer@localhost/saved_playlists'
10
+ DB_URL : process . env . DATABASE_URL || 'postgresql://tunechainer@localhost/saved_playlists'
11
11
12
12
} ;
You can’t perform that action at this time.
0 commit comments