This repository serves as a demonstration of a race condition scenario in a web application built with Express.js and MongoDB. The example includes an Express application generated with the Express generator, featuring an endpoint that increments a counter using MongoDB transactions.
- Node.js
- Express.js ( Express Generator )
- MongoDB
- Mongoose
- Docker
- Web application demonstrating a race condition scenario.
- Utilizes Mongoose for MongoDB interactions.
- Tests the behavior of incrementing a count within MongoDB transactions.
-
Clone the repository:
git clone https://github.com/ThetPaing/mongodb-race-condition-example.git
-
Run the application.
cd mongodb-race-condition-example docker compose up
-
Open your web browser and visit http://localhost:5500 to see the application in action.
-
To test MongoDB transactions, you can visit the following endpoint:
Feel free to explore, modify, and learn from this POC. If you encounter issues or have suggestions, please open an issue.
Note: This repository is for educational and testing purposes only. Be cautious when dealing with race conditions in production scenarios.
This project is licensed under the MIT License - see the LICENSE file for details.