ReqRes is a bare-bones ExpressJS application.
- Clone repo
- Make sure Node.js is installed on your machine
npm install
node app.js
or use Nodemon
npm test
This generates the final data set file and runs unit tests against the available routes.
- app.js - this is where we create the Express app and define all of our routes
- index.js - this is the main file for the callback routes
- config.json - this houses the pagination details & fake session token
- resources_config.json - this houses the configurations specific to a particular resource
- resources/*.json - this houses the individual resource data JSON files. The name of the file should be the name of the resource and the file should contain an array of items of that resource. Example: resources/movies.json
- compile_data.js - run this using
node compile_data.js
to generate the final data-set file data.json. - data.json - this is the final data-set file. It is generated by joining all the individual resource JSON files.