- An example API integration using Typescript, ExpressJS and MongoDB with Mongoose based on UK Postcode format.
- /api/import accepts
csvfiles and imports data to MongoDB - /api/search endpoint accepts
lat, long, radius (in meters)parameters and returns matching results
Rename .env.example file to .env
Running docker compose will create API and MongoDB instances
docker compose up
You can test it at http://localhost:3000
# API Routes:
+--------+-------------------------+
Method | URI
+--------+-------------------------+
GET | /api/healthcheck
GET | /api/search
POST | /api/import
+--------+-------------------------+This command will run tests if docker containers are already up
npm run testTo start docker containers and run tests:
npm run test-build- Add rate limiter
- API versioning
- Integrate Swagger