this commend start pm2 with cluster mode.
$ pm2 start [app] -i 0
this commend npm start with pm2 process.
$ pm2 start npm -- start
So I want npm start of cluster mode.
$ pm2 start npm -- start -i 0
But "npm start" don't start cluster mode.
How to "npm start" with cluster mode on pm2 ?
$ pm2 start npm -- start -i 0
it should be
$ pm2 start app.js -i 0
from the docs
I would strongly suggest using a pm2.json configuration file so you can place all your needed parameters inside and start PM2 with the Json file.
To check if PM2 is actually in cluster mode:
PM2 list all or PM2 describe [name of app]
This will show you detailed information on the running apps.
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With