Skip to content

A hosted REST-API ready to respond to your AJAX requests

Notifications You must be signed in to change notification settings

interviewstreet/reqres-public

 
 

Repository files navigation

ReqRes

ReqRes is a bare-bones ExpressJS application.

Docs & Demos ⇒

Installation

  • Clone repo
  • Make sure Node.js is installed on your machine
  • npm install
  • node app.js or use Nodemon

Testing

npm test

This generates the final data set file and runs unit tests against the available routes.

Tour

  • 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.

About

A hosted REST-API ready to respond to your AJAX requests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 62.6%
  • CSS 16.7%
  • SCSS 11.7%
  • HTML 8.9%
  • Other 0.1%