json-server makes it extremely easy to setup robust JSON apis to use for demos and proof of concepts.
This example shows how to generate datasets using lodash and faker.
NB: You will need json-server
installed: npm install -g json-server
-
Install dependencies:
npm install
-
Generate db data:
json-server generate.js
-
Run json server:
npm run db
-
Then visit: http://localhost:3000 - json-server home http://localhost:3000/people - list of people generated
-
To use the json-server "externally" E.g: from device or another machine, you can run ngrok and use the forwarding address:
npm run tunnel