https://github.com/ramithaheshan33/user-api-with-docker
This project demonstrates how to build a simple RESTful API using Node.js and Express, and how to containerize it using Docker for better deployment and scalability. Ideal for beginners looking to learn backend development and DevOps fundamentals.
https://github.com/ramithaheshan33/user-api-with-docker
containerization docker docker-image dockerfile nodejs
Last synced: 8 months ago
JSON representation
This project demonstrates how to build a simple RESTful API using Node.js and Express, and how to containerize it using Docker for better deployment and scalability. Ideal for beginners looking to learn backend development and DevOps fundamentals.
- Host: GitHub
- URL: https://github.com/ramithaheshan33/user-api-with-docker
- Owner: RamithaHeshan33
- Created: 2025-04-15T04:14:32.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-04-15T08:44:16.000Z (10 months ago)
- Last Synced: 2025-04-19T02:19:16.668Z (10 months ago)
- Topics: containerization, docker, docker-image, dockerfile, nodejs
- Language: JavaScript
- Homepage:
- Size: 965 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API-Based Containerization with Node.js & Docker 🐳
This project is a beginner-friendly tutorial that shows how to build a simple backend API using **Node.js** and **Express.js**, and how to containerize the application using **Docker**.
## 📌 Features
- Simple RESTful API built with Express
- Live reload using Nodemon
- Dockerized environment for easy deployment
- Testable locally and inside a Docker container
---
## 🚀 Getting Started
### 1. Clone the Repository
```bash
git clone https://github.com/your-username/node-api-docker.git
cd node-api-docker
```
### 2. Install Dependencies
```bash
npm install
```
### 3. Start the Development Server
```bash
npm start
```
Open http://localhost:3000 to test the API locally.
## 🐳 Docker Setup
### 1. Build Docker Image
```bash
docker build -t user-api-image:v1 .
```
### 2. Run Docker Container
```bash
docker run -d --name user-api-container -p 3001:3000 user-api-image:v1
```
Open http://localhost:3001 to test the containerized API.
## 📁 Project Structure
```pgsql
node-api-docker/
│
├── Dockerfile
├── package.json
├── index.js
└── README.md
```
## 📚 Technologies Used
- Node.js
- Express.js
- Nodemon
- Docker