官方文档:https://yapi.ymfe.org/devops/index.html#安装
说的挺清楚的,需要注意几点:
1.npm install --production 这步可能会报权限错误
后边拼上 --unsafe-perm=true --allow-root
就可以了。
2.pm2管理进程
先安装pm2
npm i pm2 -g
然后使用pm2启动进程,vendors目录执行
pm2 start server/app.js --watch
官方文档:https://yapi.ymfe.org/devops/index.html#安装
说的挺清楚的,需要注意几点:
后边拼上 --unsafe-perm=true --allow-root
就可以了。
先安装pm2
npm i pm2 -g
然后使用pm2启动进程,vendors目录执行
pm2 start server/app.js --watch
本文标题:【yapi】部署
本文链接:https://www.haomeiwen.com/subject/xnkgqqtx.html
网友评论