RESTful API endpoint to allow search in multiple clinic providers and display results from all the available clinics by any of the following:
- Clinic Name
- State [ex: "CA" or "California"]
- Availability [ex: from:09:00, to:20:00]
https://documenter.getpostman.com/view/10230743/2s93Y2ShD4
- Node.js
- Express
- Typescript
- Docker
- NodeCache
- Postman
- Jest
- Clone this repository into your local machine:
git clone https://github.com/OdunayoOkebunmi/Clinics-Provider
- cd into the folder
cd Clinics-Provider
- Create
.env
file and fill out the required information
cp .env.example .env
- Install dependencies
npm install
- Start the application by running the server script.
npm run server
-
Install postman to test all endpoints on port
3000
. -
Rate Limiting has been set up to manage requests made to the APIs.
Set the LOCAL_CACHE_TTL
in .env
file to the number of hours eg LOCAL_CACHE_TTL=3600
Routes
- Make a
GET
request tohttp://localhost:3000/
for base url - Make a
GET
request tohttp://localhost:3000/clinics
for list of clinics. You can use the query below:
query | Type | Description |
---|---|---|
name | string | Optional |
state | string | Optional |
from | string | Optional |
to | string | Optional |
-
Run
docker build -t scratch-pay .
-
Run
docker run -p 3000:3000 scratch-pay
-
Server will start on port
3000
run test using npm test
.
This project is licensed under the MIT license - see the LICENSE.md file for details.