Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

Commit

Permalink
Changes to support starting/stopping with different environments.
Browse files Browse the repository at this point in the history
  • Loading branch information
kefo committed Aug 18, 2020
1 parent 8231340 commit fdaa445
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion ecosystem.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ module.exports = {
name: 'verso',
script: './server/server.js',
watch: false,
env: {
append_env_to_name: true,
env_production: {
'AUTH': false,
'NODE_ENV': 'production',
'DB_STORAGE': 'file',
'DB_FILE': './bfpilot.json',
'NODE_OPTIONS': '--max_old_space_size=4096'
},
env_staging: {
'AUTH': false,
'NODE_ENV': 'staging',
'DB_STORAGE': 'file',
'DB_FILE': './bfpilot_staging.json',
'NODE_OPTIONS': '--max_old_space_size=4096'
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"main": "server/server.js",
"scripts": {
"lint": "eslint .",
"start": "sudo pm2 start ecosystem.config.js --update-env",
"stop": "sudo pm2 delete verso",
"start-staging": "sudo pm2 start ecosystem.config.js --name verso-staging --env staging --update-env",
"stop-staging": "sudo pm2 delete verso-staging",
"start": "sudo pm2 start ecosystem.config.js --env production --update-env",
"stop": "sudo pm2 delete verso-production",
"startstaging": "sudo pm2 start ecosystem.config.js --env staging --update-env",
"stopstaging": "sudo pm2 delete verso-staging",
"mongo": "sudo service mongodb start && sudo pm2 start ecosystem.config.js --env mongo --update-env",
"dev": "node .",
"posttest": "npm run lint && nsp check"
Expand Down

0 comments on commit fdaa445

Please sign in to comment.