- API Request:
- HTTP Method: GET
- Request URI: /rest/v1/products
- Query Parameters: NA
- Response : Products JSON object
-
API Request:
- HTTP Method: PUT
- Request URI: /rest/v1/users/:userid/cart
- Body Parameter: { "productId": "12445dsd234", "quantity": 2 }
-
API Request:
- HTTP Method: GET
- Request URI: /rest/v1/users/:userid/cart
-
Response : CartItem JSON object
- Clone this git repository
git clone https://github.com/smritae01/ProductMicroservice.git
- Run this to install all dependencies
npm install
- Start NodeJS server at http://localhost:3000
npm run start
- nodejs
- express
- mongoDB (for storage) & mongoDB Atlas (for hosting)
- mongoose