https://github.com/nemeslaszlo/node-express-mongodb-docker-compose
This repository contains an example about to configure Node.js - Express.js - MongoDB project with docker-compose
https://github.com/nemeslaszlo/node-express-mongodb-docker-compose
docker docker-compose express men-stack mongodb node
Last synced: 9 months ago
JSON representation
This repository contains an example about to configure Node.js - Express.js - MongoDB project with docker-compose
- Host: GitHub
- URL: https://github.com/nemeslaszlo/node-express-mongodb-docker-compose
- Owner: NemesLaszlo
- Created: 2021-08-27T18:56:20.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-27T18:58:50.000Z (over 4 years ago)
- Last Synced: 2025-03-24T02:44:28.380Z (about 1 year ago)
- Topics: docker, docker-compose, express, men-stack, mongodb, node
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node-Express-MongoDB-Docker-Compose
This repository contains an example about to configure Node.js - Express.js - MongoDB project with docker-compose
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
## How to run?
- Have Docker Compose installed
- Run `npm install`
- Run `docker-compose up`
- Project should be listening on port `2525`!
## How to debug(VS Code)?
- Set your breakpoints for debugging
- In Debugger tab, click "Attack to Docker".
## Endpoints available
- GET `http://localhost:2525/users`
- POST `http://localhost:2525/users`. Accepts JSON `{"name":"John Doe"}`