install
npm install pm2@latest -g# oryarn global add pm2
start
pm2 start app.jspm2 start python-app.py --watchpm2 start binary-file -- --port 1520
manager
pm2 [list|ls|status|logs|monit|plus|save|update]pm2 restart app_namepm2 reload app_namepm2 stop app_namepm2 delete app_namepm2 stop all # Stop all processespm2 restart all # Restart all processespm2 reload all # Will 0s downtime reload (for NETWORKED apps)pm2 stop 0 # Stop specific process idpm2 restart 0 # Restart specific process idpm2 delete 0 # Will remove process from pm2 listpm2 delete all # Will remove all processes from pm2 list
file
pm2 ecosystempm2 start process.ymlpm2 startup