File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 "private" : true ,
55 "scripts" : {
66 "start" : " DEBUG=hackboard:* NODE_ENV=development nodemon --ignore gcp_creds.json ./bin/www.js" ,
7- "start-windows" : " set DEBUG=hackboard:* && set NODE_ENV=test && nodemon --ignore gcp_creds.json ./bin/www.js" ,
7+ "start-windows" : " set DEBUG=hackboard:* && set NODE_ENV=development && nodemon --ignore gcp_creds.json ./bin/www.js" ,
88 "deploy" : " NODE_ENV=deployment node ./bin/www.js" ,
99 "debug" : " DEBUG=hackboard:* NODE_ENV=development nodemon --ignore gcp_creds.json ./bin/www.js" ,
1010 "test" : " DEBUG=hackboard:* NODE_ENV=development mocha -r dotenv/config --reporter spec tests/**.js --exit" ,
Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ function getUserFromEnvironment() {
2828}
2929
3030function getPassFromEnvironment ( ) {
31- return process . env . NODE_ENV === "development"
31+ return env . isDevelopment ( )
3232 ? process . env . DB_PASS_DEV
33- : process . env . NODE_ENV === "deployment"
33+ : env . isProduction ( )
3434 ? process . env . DB_PASS_DEPLOY
3535 : process . env . DB_PASS_TEST ;
3636}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ module.exports = {
1212 return result ;
1313 } ,
1414 isDevelopment : function ( ) {
15- return process . env . NODE_ENV === "development" ;
15+ return process . env . NODE_ENV . trim ( ) === "development" ;
1616 } ,
1717 isProduction : function ( ) {
1818 return process . env . NODE_ENV === "deployment" ;
You can’t perform that action at this time.
0 commit comments