I want to start multiple processes by pm2.
I found how to start one process for npm run start:
pm2 start npm -- start
But when I've tried make something like pm2 start npm -- event for npm run event it doesn't start a new process but restarts the first one.
How can I start multiple process by npm and pm2?
Use the --name flag to give each processes a unique name for PM2 to identify them by.
For example:
pm2 start --name=start npm -- start
pm2 start --name=event npm -- run event
Further operations should use the name you have given each process. For example to stop them:
pm2 stop start
pm2 stop event
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