Mockup REST API Generator: JSON Server

options(width = 150)
options(max.print = 30)

Install:

npm install -g json-server
cat ex/db.json
## {
##   "posts": [
##     { "id": 1, "title": "json-server", "author": "typicode" }
##   ],
##   "comments": [
##     { "id": 1, "body": "some comment", "postId": 1 }
##   ],
##   "profile": { "name": "typicode" }
## }
json-server --watch ex/db.json
curl http://localhost:3000/posts/1
## {
##   "id": 1,
##   "title": "json-server",
##   "author": "typicode"
## }

 Tech    27 Feb, 2018

Any work (images, writings, presentations, ideas or whatever) which I own is always provided under
Creative Commons License Creative Commons Attribution-Share Alike 3.0 License

Mert Nuhoglu is a Trabzon-born programmer and data scientist.

You may also like...