json-api-spec

1.0.0-alpha.13 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i json-api-spec

Weekly Downloads

0

Version

1.0.0-alpha.13

License

MIT

Unpacked Size

7.01 kB

Total Files

7

Last publish

Collaborators

  • thinkholic