step1:下载moco-runner
step2:配置Json文件
[
{
"description":"这是我们的第一个mock例子",
"request":{
"uri":"/demo"
},
"response":{
"text":"first moco demo"
}
}
]
step3:在 Terminal终端进入moco-runner所在文件夹下输入
java -jar ./moco-runner-0.11.0-standalone.jar http -p 8888 -c startup1.json
在浏览器中输入
http://localhost:8888/demo](http://localhost:8888/demo
页面显示:first moco demo
网友评论