Skip to content

Commit 32ac424

Browse files
authored
Create Yapi 内网部署-避坑.md
1 parent 04b6ec1 commit 32ac424

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Yapi 内网部署-避坑
2+
3+
## 开源地址
4+
5+
https://github.com/YMFE/yapi
6+
7+
## 内网部署
8+
9+
方式一. 可视化部署:
10+
https://hellosean1025.github.io/yapi/devops/index.html
11+
12+
## 问题-解决
13+
14+
如果我们把cmd窗口关闭了,这时候我们就无法访问Yapi了,这时候我们就可以使用 pm2 管理 node 服务器启动,停止
15+
16+
1:安装pm2 安装需要等待一会
17+
18+
```
19+
npm i -g pm2
20+
```
21+
22+
2:使用pm2管理yapi服务
23+
24+
>进入Yapi的部署目录执行
25+
26+
```
27+
pm2 start "vendors/server/app.js" --name yapi
28+
```
29+
30+
pm2操作Yapi基本命令:
31+
32+
```
33+
pm2 info yapi //查看服务信息
34+
pm2 start yapi //停止服务
35+
pm2 stop yapi //停止服务
36+
pm2 restart yapi //重启服务
37+
```

0 commit comments

Comments
 (0)