Open GenweiWu opened 2 years ago
可以通过简单的配置json文件,就能实现mock服务器的效果
## 表示启动服务器,且启动端口为10081 java -jar moco-runner-1.3.0-standalone.jar http -p 10081 -g ./json/settings.json -s 9527
[ { "include" : "./json/111.json" }, { "include" : "./json/222.json" }, { "include" : "./333.json" } ]
[ { "description": "testService", "request": { "method": "get", "uri": "/v1/hello" }, "response": { "json": { "code": 1, "msg": "get data success" }, "headers": { "Content-Type": "application/json;charset=utf-8" } } } ]
mock server --moco
可以通过简单的配置json文件,就能实现mock服务器的效果
入门
1. 下载moco的jar包,并且启动
2. settings文件大概长这样
3. 对应111.json大概长这样