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 重啟看 是否能正常打開