Skip to content

Commit

Permalink
fix npm pm2 calls
Browse files Browse the repository at this point in the history
  • Loading branch information
alainib committed Nov 10, 2019
1 parent fd56ef3 commit 4b5b846
Show file tree
Hide file tree
Showing 24 changed files with 1,297 additions and 110 deletions.
34 changes: 34 additions & 0 deletions ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
apps: [{
"name": "web",
"script": "./web/node_modules/react-scripts/scripts/start.js",
"instances": 1,
"exec_mode": "cluster",
"error_file": 'err.log',
"out_file": 'out.log',
"log_file": 'combined.log',
"watch": ["src"],
"ignore_watch": ["node_modules", ".git"],
"env": {
"NODE_ENV": "development",
"PORT": "1112"
}
}, {
name: 'api',
script: './express-api/app.js',
args: 'one two',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'development',
"PORT": "1111"
},
env_production: {
NODE_ENV: 'production',
"PORT": "1111"
}
}
]
};
3 changes: 1 addition & 2 deletions express-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"startnode": "node app.js",
"startmp2": "pm2 start pm2.json --no-daemon",
"start": "node app.js"
"start": "pm2 start pm2.json"
},
"author": "",
"license": "ISC",
Expand Down
Loading

0 comments on commit 4b5b846

Please sign in to comment.