pm2 is a process management tool that you can use to manage your node process, and view node status of the process, of course, also support performance monitoring, process guard, load balancing and other functions
1, pm2 global need to install npm install -g pm2
2, into the root directory of the project
2.1 start the process / applicationpm2 start bin/www 或 pm2 start app.js
2.2 Renaming process / application pm2 start app.js --name wb123
2.3 add process / application watch pm2 start bin/www --watch
End 2.4 process / application pm2 stop www
2.5 End all processes / applications pm2 stop all
2.6 removal process / application pm2 delete www
2.7 Delete all processes / applications pm2 delete all
2.8 List all processes / applications pm2 list
2.9 View a process / application specific situation pm2 describe www
Resource consumption 2.10 View processes / applications pm2 monit
View pm2 2.11 log pm2 logs
2.12 To view a process / application logs, and use pm2 logs www
2.13 restart the process / application pm2 restart www
2.14 Restart all processes / applications pm2 restart all
Author: shows ten
link: https: //www.jianshu.com/p/e15fd72727fe
Source: Jane books
are copyrighted by the author. Commercial reprint please contact the author authorized, non-commercial reprint please indicate the source.