How to change the PM2 process name?

How we can change the PM2 process name after started our Node.js application with PM?. By right, default process name will be “index” or “server” and it depends on Node.js server names like index.js or server.js.

So, will the following command you can easily change the new process name. Check it out. 

$ pm2 restart id --name newName

P.S : You need to replace the id with your PM2 process id e.g. 0 or 1.

That’s it. I hope this will help. 🙂
Photo: https://www.brandeps.com

Leave a Reply

Your email address will not be published. Required fields are marked *