This is a simple API to simulate the Monty Hall problem. The API allows you to run multiple simulations with the option to change or keep the initial door choice after the host reveals a goat.
These instructions will help you set up and run the project on your local machine.
- Docker installed on your local machine.
- Clone the repo
git clone [email protected]:ahmedalawady/Monty-Hall.git
- Build the Docker image
docker build -t monty-hall-simulation .
- Run the Docker container
docker run -p 3000:3000 monty-hall-simulation
The server will run on http://localhost:3000, and the API documentation can be accessed at http://localhost:3000/api-docs.
- Typescript
- Nodejs
- Expres
- Docker
- No databases used as saving simulation results was not required.
- Separated MontyHall class for modularity and separation of concerns, allowing easy modification without affecting routes.
- Generic Routes class designed to facilitate the addition of new APIs in the future.
- Containerization with Docker for simplified deployment and portability.
- ESLint and Prettier integration to maintain code consistency and improve maintainability.
- No authentication required
- Logging
- Error handling
- Increase test coverage
- Authentication
- Rate Limit
- Validation limits