Getir Challenge
An Api that allows you to fetch records based on counts and dates passed.
Installation
Run the following
1. $ git clone https://github.com/samuelayo/getir-challenge.git
2. $ cd getir-challenge
3. $ npm i
Running the app
- Rename
env.sample
file to.env
, fill the variables and save. DEFAULT_DATABASE_URI
Takes the default mongodb connection string.PORT
Takes the port in which we want the app to run on, defaults to 8000 if not set.
Without Docker
Run
$ npm start
With Docker
Run the following
1. Build the docker image - $ docker build -t getir-challenge .
2. Run the docker image - $ docker run -d -p 80:${PORT} getir-challenge
API Documentation
Navigate your browser to the /guide route of the app.
Testing
To test the app, run:
$ npm run test