JSON Server - RevatureRideShare/meta-ui GitHub Wiki

JSON Server is a Javascript dependency used for creating a local, front-end database using JSON files as the storage system. It is fully RESTful, meaning you can send requests at it and expect information to be created, read, updated and deleted in a RESTful manner. It is incredibly useful for testing requests and data transfer without the need for backend.

How to run JSON Server in RideShare Angular project

  • Make sure to have run npm install at least once.
  • In package.json, there are scripts with the json-server prefix. These contain the specific json-server commands with additional configuration options on how to run the json-server. To modify these configurations, look for the .configuration.json file (example: user-table.configuration.json) located within the src/app/json-server folder.
  • Once the configuration has been set, run the script with npm run. Example: npm run json-server-user

Resources: