1.0.0-alpha.13 • Published 4 years ago

json-api-spec v1.0.0-alpha.13

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

json:api:spec MockServer

Get up and running fully MockAPIServer with zero coding.

Getting Started

Install npm package.

npm install -g json-api-spec // or npm install -d json-api-spec

Create JSON SPEC file anywhere on your computer.

api.json

{
  "posts": [
    { "id": 1, "title": "Hello World!", "author": "John Doe" }
  ],
  "comments": [
    { "id": 1, "body": "Some comment", "postId": 1 }
  ]
}

Start MockServer

mock-server -s ./api.json -p 3001

The MockAPIServer will start on port ::3001/api/* (or on the port you specified).

Available Routes

GET resource
GET resource/:id
POST resource
PUT resource/:id
PATCH resource/:id
DELETE resource/:id

License

MIT