- Install Docker on your system, ignore if it is already installed
- Clone the Project in any diretory on your local machine
- Open terminal and go to the directory where project is cloned
- Run below commands to build and run the project
docker build -t large-file-processor .
docker run -it -p 8080:3000 -d large-file-processor
Server runs on PORT: 8080
- API Link: localhost/8080
-
Import
products.csv
file to intoproducts
collection of MongoDB- API Link:
localhot/8080/api/products/import
- METHOD: GET
- API Link:
-
Get all the products from the database
- API Link:
localhot/8080/api/products/fetchdata
- METHOD: GET
- API Link:
-
Update a product by
sku
field as primary key- API Link:
localhot/8080/api/products/:sku/update
- METHOD: PUT
- API Link:
-
Aggregate products by
no. of products
based on rows with samename
- API Link:
localhot/8080/api/products/aggregate
- METHOD: GET
{ "success": "Products aggregated", "status": 200, "data": [ { "_id": "Kevin Brennan", "total": 1 }, { "_id": "Angela Thompson", "total": 1 }, { "_id": "Sarah Edwards", "total": 1 }, . . . ] }
- API Link:
-
Get product by id
- API Link:
localhot/8080/api/products/:id
- METHOD: GET
- API Link: