A RESTful NodeJs API with a single endpoint that fetches the data in the provided MongoDB collection and return the results in the requested format.
git clone git@github.com:Vaigadre/getir-case-study.git
npm install
npm run start
npm run test
POST /api/v1/records
sample Request body:
{
"startDate": "2016-01-26",
"endDate": "2016-12-30",
"minCount": 2700,
"maxCount": 3000
}
sample Response body:
{
"code": 0,
"msg": "Success",
"records": [
{
"key": "ibfRLaFT",
"createdAt": "2016-12-25T16:43:27.909Z",
"totalCount": 2892
},
]
}