Using json-server to server multiple json files in less than 45 seconds (trust me).
- nodemon
sudo npm install -g nodemon
- Place your .json files into the
db
folder (⚠️ make sure they match the format) - Install dependencies with
npm install
- Run the server :
npm run start:server
[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
- Check the json format, and remove json that does not match.
MIT