Skip to content

Commit

Permalink
added pm2 config
Browse files Browse the repository at this point in the history
  • Loading branch information
shylesharepelly committed Feb 26, 2024
1 parent bf47c37 commit cdca137
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
apps: [
{
name: 'online-voting',
script: 'index.js',
instances: 'max',
exec_mode: 'cluster',
env: {
NODE_ENV: 'production',
PORT: process.env.PORT || 3000,
},
},
],
};

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"start": "nodemon -e js,ejs",
"dev": "npx pm2 start ecosystem.config.js --env production",
"start:prod": "node index.js",
"pretest": "NODE_ENV=test npx sequelize-cli db:drop && NODE_ENV=test npx sequelize-cli db:create",
"test": "NODE_ENV=test jest --detectOpenHandles",
Expand Down

0 comments on commit cdca137

Please sign in to comment.