diff --git a/ecosystem.config.js.template b/ecosystem.config.js.template index 38fd4f4..ee496bd 100644 --- a/ecosystem.config.js.template +++ b/ecosystem.config.js.template @@ -7,6 +7,7 @@ module.exports = { autorestart: false, watch: false, cron_restart: "*/15 * * * *", + exec_mode: 'fork', max_memory_restart: '1G', env: { NODE_ENV: 'development', diff --git a/start.sh b/start.sh index 4ec2a5c..61f593b 100755 --- a/start.sh +++ b/start.sh @@ -30,6 +30,7 @@ KEY_LEN=$(echo -n $key | wc -m) if [[ $KEY_LEN = 0 ]] then echo "Invalid key passed" + exit fi KEY=$key pm2 start --only $instance --env $env \ No newline at end of file