Created
July 5, 2019 22:01
-
-
Save AhmedCommando/03028b01d140924b1910c5406a879dac to your computer and use it in GitHub Desktop.
pm2 ecosystem file for production mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cluster mode for production env | |
module.exports = { | |
apps: [ | |
{ | |
...require('./pm2.config'), | |
instances: 2, // can be max or any number of processes the cpu can handle | |
exec_mode: "cluster", | |
env: { | |
"PORT": 8080, | |
"NODE_ENV": "production" | |
}, | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment