Skip to content
loading...

Set up Express+Mongo API server using this Docker Compose boilerplate

github logo ・1 min read  

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.yml file for booting up a Node and MongoDB containers
  • a modified Dockerfile for 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.json for simple NodeJS debugging in VS Code

Link to the boilerplate:
https://github.com/kethmars/docker-compose-express-mongo

Have fun :)!

twitter logo DISCUSS (1)
Classic DEV Post from Dec 11 '19

If you work as a dev for a product team, what's it like?

kethmars profile image
Always learning, always in motion. Creator of developerHabits - a Youtube channel about developer lifestyle, growth mindset and webdev tutorials.

Hey there reader...

Do you prefer sans serif over serif?

You can change your font preferences in the "misc" section of your settings. ❤️