/
๐Ÿ“

P(rocess) M(anager) 2

https://github.com/Unitech/pm2
pm2cli
On this page
  • Start an application
  • List all processes
  • Monitor
  • Upgrade

PM2 is a production process manager for Node.js applications with a built-in load balancer. It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks.

Start an application

sh
pm2 start app.js

List all processes

sh
pm2 ls

Monitor

sh
pm2 monit

Upgrade

sh
# save correctly all your processes
pm2 save
# install the latest PM2 version from NPM
npm install pm2@latest -g
# update the in-memory PM2 process
pm2 update
# When you upgrade your Node.js version, the node binary path will change.
# To update the PM2 startup script
pm2 unstartup
pm2 startup
Edit this page
logo
Code-related notes and snippets