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 保存
Reboot 重启看 是否能正常打开