myRetail is a RESTful service that can retrieve product and price details by ID.
- Node.js
- Robo3T (not required but helpful for managing mongo mock data.)
- clone or fork this repository
- run
npm install
- start mongo using mongod
- run
npm start
- mock data can be found and copied from data.js
- Responds to an HTTP GET request at /products/{id} and delivers product data as JSON (where {id} will be a number.
- Performs an HTTP GET to retrieve the product name from an external API. (ex. The Big Lebowski (Blu-Ray))
- Reads pricing information from a NoSQL data store and combines it with the product id and name from the HTTP request into a single response.
- Accepts an HTTP PUT request at the same path (/products/{id}), containing a JSON request body similar to the GET response, and updates the product’s price in the data store.