ericdesa / json-server-multiple-files

A way to serve multiple json files using the json-server package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🚀 json-server-multiple-files

Using json-server to server multiple json files in less than 45 seconds (trust me).

Prequisite

  • nodemon sudo npm install -g nodemon

Getting Started

  1. Place your .json files into the db folder (⚠️ make sure they match the format)
  2. Install dependencies with npm install
  3. Run the server : npm run start:server

Output

[nodemon] 1.18.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: test/mock
[nodemon] starting `node json-server.index.js`


πŸ—’    JSON file loaded : places.json
πŸ—’    JSON file loaded : teams.json

β›΄    JSON Server is running at http://localhost:3002
πŸ₯    Endpoint : http://localhost:3002/organisations
πŸ₯    Endpoint : http://localhost:3002/tenders

Todo

  • Check the json format, and remove json that does not match.

Built With

License

MIT

About

A way to serve multiple json files using the json-server package

License:MIT License


Languages

Language:JavaScript 100.0%