- NestJS
- Swagger API Documentation
- Docker
-
Priority Queue (min)
is used for the nearest parking slot allocation to achieve the best time complexity -
Map<>
is used as a in-memory database to store the parking slots details -
Set<>
is used to hold the unique vehicle registration numbers
Build the docker image
$ docker build -t parking-lot .
Run the container
$ docker run -p3000:3000 parking-lot
Browse the API swagger documentation:
http://localhost:3000/api
$ npm install
$ npm run start
# unit tests
$ npm run test