install
npm install pm2@latest -g
# or
yarn global add pm2
start
pm2 start app.js
pm2 start python-app.py --watch
pm2 start binary-file -- --port 1520
manager
pm2 [list|ls|status|logs|monit|plus|save|update]
pm2 restart app_name
pm2 reload app_name
pm2 stop app_name
pm2 delete app_name
pm2 stop all # Stop all processes
pm2 restart all # Restart all processes
pm2 reload all # Will 0s downtime reload (for NETWORKED apps)
pm2 stop 0 # Stop specific process id
pm2 restart 0 # Restart specific process id
pm2 delete 0 # Will remove process from pm2 list
pm2 delete all # Will remove all processes from pm2 list
file
pm2 ecosystem
pm2 start process.yml
pm2 startup