/mock-api

Fast mock data in Rest API server.

Primary LanguageGoMIT LicenseMIT

mock-api

Fast mock data in Rest API server.

Build

$ go build . 

# ouput: mapi
# move `mapi` to local bin or use directly

How to use

  1. json file
  • data.json
{
    "data": "message"
}
  1. Mock data.json on API
    $ cat data.json | mapi serve
  1. Test
$ curl localhost:8080/mock
# ---- response
# {
#     "data": "message"
# }