BAT 都在使用的开源接口管理平台,你用了吗?
总阅读量:263次
摘要: 原创出处 jianshu.com/p/a97d2efb23c5 「Anoyi」欢迎转载,保留摘要,谢谢!
介绍
给大家推荐一个开源接口管理平台YApi,众多互联网大厂都在使用
YApi 的一些客户:百度,阿里巴巴,腾讯,今日头条等
GitHub地址:https://github.com/YMFE/yapi
github上有本地安装的教程,因为docker安装比较方便,因此官方推荐了如下docker安装教程,当然docker镜像不是官方做的。建议配置阿里云Docker镜像仓库,下载起来比较快
使用 Docker 构建 YApi
1.启动 MongoDB
docker run -d --name mongo-yapi mongo |
2.获取 Yapi 镜像,版本信息可在 阿里云镜像仓库 查看
docker pull registry.cn-hangzhou.aliyuncs.com/anoy/yapi |
3.初始化 Yapi 数据库索引及管理员账号
docker run -it --rm \ |
自定义配置文件挂载到目录 /api/config.json,官方自定义配置文件 https://github.com/YMFE/yapi/blob/master/config_example.json
4.启动 Yapi 服务
docker run -d \ |
使用 Yapi
访问 http://localhost:3000 登录账号 admin@admin.com,密码 ymfe.org
至此,帅气的 YApi 就可以轻松使用啦!更多文档信息,请参考
YApi 官方教程 https://hellosean1025.github.io/yapi/documents/index.html
YApi 版本更新记录 https://github.com/YMFE/yapi/blob/master/CHANGELOG.md
其他相关操作
1.关闭 YApi
docker stop yapi |
2.启动YApi
docker start yapi |
3.升级 YApi
# 1、停止并删除旧版容器 |
手动构建 YApi 镜像
1.下载 YApi 到本地
wget -o yapi.tar.gz https://github.com/YMFE/yapi/archive/v1.8.0.tar.gz |
下载地址:https://github.com/YMFE/yapi/releases
2.编辑 Dockerfile
FROM node:12-alpine as builder |
3.构建镜像
docker build -t yapi . |
旁白君~更多 Yapi 的使用,胖友可以看看 https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-24 仓库,嘿嘿~