前端接口测试工具jsonserver

json server 
https://github.com/typicode/json-server
全局安装
npm i -g json-server

安装后 输入 json-server 没报错说明安装成功
在任意目录创建db.json
监听:
json-server --watch --port 3001 db.json

  

 

 

前缀作为端口后的访问地址

{
  "posts": [
    { "id": 1, "title": "json-server", "author": "typicode" }
  ],
  "comments": [
    { "id": 1, "body": "some comment", "postId": 1 }
  ],
  "profile": { "name": "typicode" }
}

  

posted @ 2020-11-03 22:24  三号小玩家  阅读(355)  评论(0)    收藏  举报
Title
三号小玩家的 Mail: 17612457115@163.com, 联系QQ: 1359720840 微信: QQ1359720840