pm2 常用命令

pm2 常用命令

// 启动 npm
pm2 start --name testName npm -- run start
// 启动 yarn
pm2 start --name testName yarn -- start

// 查看任务
pm2 ls

// 查看log日志
pm2 log 1

pm2 save --- 保存列表
pm2 startup   --- 开机自启动

// 关闭pm2 进程
pm2 kill