Created
September 25, 2020 05:54
-
-
Save akumbhani66/75a86c97fbf9e419495351923e275768 to your computer and use it in GitHub Desktop.
sample pm2 ecosystem config
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
module.exports = { | |
apps: [ | |
{ | |
name: 'node-server', | |
script: './bin/www', | |
error_file: './logs/err.log', | |
out_file: './logs/out.log', | |
time: true, | |
log_date_format: 'YYYY-MM-DD HH:mm Z', | |
watch: false, | |
kill_timeout: 30000, // At least 30s for connections to close | |
wait_ready: true, // Wait for ready signal before accepting requests | |
instances: 'max', // Max: Cluster on all CPU cores | |
exec_mode: 'cluster', | |
}, | |
{ | |
name: 'test-server', | |
script: './bin/www', | |
watch: false, | |
kill_timeout: 30000, // At least 30s for connections to close | |
wait_ready: true, // Wait for ready signal before accepting requests | |
instances: 3, // Max: Cluster on all CPU cores | |
exec_mode: 'cluster', | |
// node_args: '--trace-warnings', | |
}, | |
], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment