File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1- web : pm2 start server.js
1+ web : npm run prod
Original file line number Diff line number Diff line change 1+ require ( 'dotenv' ) . config ( ) ;
2+
3+ module . exports = {
4+ apps : [
5+ {
6+ name : 'MyApp' ,
7+ script : 'server.js' ,
8+
9+ // Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/
10+ instances : 2 ,
11+ autorestart : true ,
12+ watch : false ,
13+ max_memory_restart : '1G'
14+ }
15+ ]
16+ } ;
Original file line number Diff line number Diff line change 1212 "scripts" : {
1313 "start" : " cross-env NODE_ENV=development nodemon server.js" ,
1414 "test" : " cross-env NODE_ENV=test babel-tape-runner test/test-*.js" ,
15- "pretest" : " eslint ."
15+ "pretest" : " eslint ." ,
16+ "prod" : " pm2-runtime start ecosystem.config.js --env production"
1617 },
1718 "dependencies" : {
1819 "body-parser" : " ~1.18.3" ,
You can’t perform that action at this time.
0 commit comments