Nginx下nuxt部署并启动PM2项目
warning:
这篇文章距离上次修改已过1332天,其中的内容可能已经有所变动。
Nginx下启动PM2项目
1.上传文件到网站目录
.nuxt
static
nuxt.config.js
package.json
package-lock.json- 切换到对应目录
cd /home/wwwroot/test/ - 安装对应组件
npm install -production - 启动 npm 服务
npm start - 创建并启动PM2项目
pm2 start --name 'test' npm -- run start - 开启进程守护
pm2 save