1.1.3 • Published 4 years ago

simple-json-server v1.1.3

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

simple-json-server

Inspired from json-server. simple-json-server gives the configured response data for different request methods of requests.

Installation

npm install -g simple-json-server

Usage

simple-json-server -p [port(default 3000)] -f [file name in current directory(default db.json)] -fp [file path with file name]

Response Configuration

add URL Tag as name and response json as value in db.json, no restart required after configuration changes.

{
    "API_1" : {
      "GET": {
          "GETresponse" : "value"
      },
      "POST": {
          "POSTresponse" : "value"
      },
      "PUT": {
          "PUTresponse" : "value"
      },
      "DELETE": {
          "DELETEresponse" : "value"
      }
      //You can add more methods here
    },
    "API_2" : {
      "some_response" : "value" // Returns entire json, If no methods specified
    }
}

Hit the URL localhost:{port}/API_1

1.1.3

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.6

4 years ago

1.1.2

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago