YApi 是由去哪儿移动架构组推出的一款开源项目,是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。
github:https://hellosean1025.github.io/yapi/
文档:https://hellosean1025.github.io/yapi/documents/index.html
特性:
https://hellosean1025.github.io/yapi/devops/index.html#%E5%AE%89%E8%A3%85
环境要求
- nodejs(7.6+)
- mongodb(2.6+)
windows
环境
1、安装node.js
https://www.runoob.com/nodejs/nodejs-install-setup.html
2、安装MongoDB
https://www.runoob.com/mongodb/mongodb-window-install.html
3、安装git
https://www.runoob.com/git/git-install-setup.html
4、执行
npm install -g yapi-cli --registry https://registry.npm.taobao.org
yapi server
进入可视化安装页面
http://127.0.0.1:9000


修改公司名称和邮箱地址,点击开始部署

执行 node vendors/server/app.js
提示安装完成
访问 http://127.0.0.1:3000
用户登陆:输入您刚才设置的管理员邮箱,默认密码(ymfe.org) 登录系统(默认密码可在个人中心修改)。
PM2是node进程管理工具,可以利用它来简化很多node应用管理的繁琐任务,如性能监控、自动重启、负载均衡等,而且使用非常简单。
官网推荐使用 pm2 管理 node 服务器启动,停止,具体使用方法可参考下面的教程:
npm install pm2@latest -g
切换到yapi的vendors目录 执行pm2 start
pm2 start server/app.js --watch
docker安装:https://www.cnblogs.com/qgc1995/p/9549896.html
原文:https://www.cnblogs.com/mituxiaoshutong/p/11284015.html