Live Demo -> View Demo
-
Open
Postman
. -
Click on
Import
from toolbar. -
Choose tab
Import From Link
. -
Paste the collection link
https://www.postman.com/collections/14250005c131ba872b32
and click onImport
. -
That's it. Now you have all the API's in your
Postman
.
-
Clone the repo.
-
Run
npm i
, To install all the dependencies. -
Edit the
'.env.dev'
file in project root with your local MONGODB URI or you can use the one provided. -
If you haven't changed the MONGO DB URI ,
Go to Step 5
. If you have used your local MONGO DB URI, Go toData Migrations
and thenGo to Step 5
, -
Run
npm run start-watch
, to start the server -
Done! You have the server working.
-
Verify it by using
localhost:PORT_NO
where port no. is the one you have mentioned in .env.dev file. eg. for port 3000 it islocalhost:3000
- Go to directory
public/data/products/data.json
- Use this json data in the API for products from Postman collection to seed the products collection.
- Followed Microservices architecture by keeping every services in it's own directory.
- Also, For Microservices all the service should have it's own database but for this assignment i kept it as one.
- For the live demo the project is hosted on heroku and MongoDB for same is hosted using MongoDB Atlas.
- Caching is not done. It can be implemented if the frequency for adding or updating the products is much longer.