This is a simple implementation of a JSON Server to provide dummy or mock data for testing or development purpose.
Put your data in the file data.json.
The property of the root element will be your endpoints.
Start the server
npm i && npm start
You will get your data on port 3000
.
example of data.json
:
{
"info": {
"version": "1.0.0"
},
"users": [{
"id": 123,
"firstname": "Nicola",
"lastname": "Paoli"
}]
}
This configuration Will create the following endpoints:
{"version": "1.0.0"}
[{"id":123,"firstname":"Nicola","lastname":"Paoli"}]