Disable restarting in PM2

kamesh picture kamesh · Dec 15, 2015 · Viewed 12.5k times · Source

I need to stop my nodejs app for some conditions.So I have used process.exit() method. I am running my app with PM2. But PM2 is restarting the app whenever it was stopped. So is there any possibility to disable restarting in PM2.

Answer

Jxx picture Jxx · Dec 15, 2015

I think you need the --no-autorestart flag.

"do not automatically restart apps"

http://pm2.keymetrics.io/docs/usage/quick-start/