Last year, I had to build a couple of simple Express+Mongo API's. For convenience, I used Docker Compose to set up the necessary environments.
I thought this boilerplate may also benefit others to quickly start developing their APIs.
The project includes:
docker-compose.ymlfile for booting up a Node and MongoDB containers
- a modified
Dockerfilefor installing packages and setting up ports for debugging
- Nodemon to follow changes in projects
- Logic to connect to DB
- Example controllers for fetching data from MongoDB
launch.jsonfor simple NodeJS debugging in VS Code
Link to the boilerplate:
Have fun :)!