Mock 平台建设方案

名称
是否支持私有化部署
是否开源
备注
https://www.apifox.cn/ 收费  
https://easydoc.net/ 收费  
https://github.com/easy-mock/easy-mock 支持 推荐
http://yapi.smart-xwork.cn/ 支持 推荐
https://www.eolinker.com/ 收费  
https://www.showdoc.cc/ 收费  
https://www.easyapi.com/ 收费  
https://apizza.net 收费  
https://www.apipost.cn/ 收费  

 

easy-mock 部署

环境:nodejs 8.17.0

步骤1:下载安装

$ git clone https://github.com/easy-mock/easy-mock.git
$ cd easy-mock && npm install

步骤2:修改配置文件

config/default.json

  • 修改 db
  • 修改 redis
1
2
3
4
5
6
7
8
9
"db": "mongodb://用户:密码@链接串/认证数据库?replicaSet=副本集名称",
 "unsplashClientId": "",
 "redis": {
   "keyPrefix": "[Easy Mock]",
   "port": 6379,
   "host": "连接串",
   "password": "",
   "db": 0
 },

  

步骤3:启动服务

1、先执行 build 操作

 

npm run build

2、启动服务

 
1
2
3
4
npm run start
  
或者 PM2进程守护
NODE_ENV=production pm2 start app.js

 

  

介绍一个快速把接口文档转为 ts 文件

基于 openAPI,快速把后端 swagger2.0 或者 3.0 协议转为代码
https://beta-pro.ant.design/docs/openapi-cn
https://www.npmjs.com/package/@umijs/openapi
https://github.com/umijs/umi/issues/9703#issuecomment-1303221373

 

posted @   地铁程序员  阅读(229)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
历史上的今天:
2020-02-19 /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found的解决办法
2019-02-19 面试题集锦(一)
2018-02-19 Vue之九数据劫持实现MVVM的数据双向绑定
2018-02-19 Object的方法
点击右上角即可分享
微信分享提示