A simple Node.js + Express application containerized using Docker. This project demonstrates the fundamentals of Dockerizing a web application and follows best practices for Node.js projects.
- Express.js web server
- Docker container support
- Health check endpoint
- Production-ready project structure
- Clean Git repository with
.gitignore
- Node.js
- Express.js
- Docker
- Git
- GitHub
01-docker-nodejs-app/
│── app.js
│── package.json
│── package-lock.json
│── Dockerfile
│── .gitignore
└── README.md
git clone https://github.com/kavin0521/01-docker-nodejs-app.gitcd 01-docker-nodejs-appnpm installnpm startThe application will be available at:
http://localhost:3000
Build the Docker image:
docker build -t nodejs-devops-app .Run the container:
docker run -d -p 3000:3000 --name my-node-app nodejs-devops-appStop the container:
docker stop my-node-app| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Home page |
| GET | /health |
Health check endpoint |
Add a screenshot of the application here later.
- Building an Express.js application
- Dockerizing a Node.js application
- Managing Git repositories
- Using
.gitignorecorrectly - Creating health check endpoints
- Writing project documentation
Kavin
GitHub: https://github.com/kavin0521
This project is licensed under the MIT License.