Skip to content

Instantly share code, notes, and snippets.

@AhmedCommando
Created July 5, 2019 22:01
Show Gist options
  • Save AhmedCommando/03028b01d140924b1910c5406a879dac to your computer and use it in GitHub Desktop.
Save AhmedCommando/03028b01d140924b1910c5406a879dac to your computer and use it in GitHub Desktop.
pm2 ecosystem file for production mode
// 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