14.【nuxt起步】-Pm2 和nuxt服务运行

1.安装pm2

npm install pm2 -gd

2.启动

Pm2 start ./bin/www

3. pm2 save

4.Pm2 startup

5.Pm2 save
修改 package.json

"scripts": {

  "build": "nuxt build && npm start",

}

web当前目录

pm2 start npm --name "xxxx-nuxt" -- run build

Pm2 list 查看进程

Pm2 save 保存

pm2 reload id 重载指定进程

Reboot 重启看 是否能正常打开

原文地址:https://www.cnblogs.com/kobewang/p/10106504.html