bluehost-banner

How to run "npm start" with PM2

While developing NodeJs Application we mostly use the npm start command to run the application, we can also use the same in PM2 process manager, as follow"


To run npm start command with PM2:

pm2 start npm -- start

You can use -name option to assign a name to the PM2 process.

pm2 start npm --name "app-name" -- start