pm2 的使用 - fubd/blowfish GitHub Wiki
npm install -g pm2
pm2 start ./bin/www --watch
--watch自动重启
根据npm脚本启动 https://stackoverflow.com/questions/46008665/how-to-start-a-package-json-script-in-pm2
pm2 start npm --name "{app_name}" -- run "{script_name}"
注意:--和run是分开的
pm2 log <taskname>
查看某个pm2任务log
pm2 logs
查看整体log
pm2 info id/app name
查看某个任务log输出日志
pm2 info id/app name
查看某个任务
pm2 describe name
查看某个任务
pm2 list
查看所有任务
pm2 stop app_name|app_id
停止某个
pm2 stop all
停止所有