A containerized Node.js REST API for serving JSON data — built to be lightweight, portable, and extendable.
Application Architecture — node-json-app Containerized Node.js REST API serving JSON responses
🖥️ Client curl / Browser HTTP GET 🐳 Docker Container — port 3000 📦 Node.js Server app.js — port 3000 GET / → JSON response returns JSON Response { "status": "ok", "data": [...] } ✅ Response 200 OK + JSON Stack: Node.js JavaScript Docker Run: docker build -t node-json-app . → docker run -p 3000:3000 node-json-app → curl localhost:3000Project Structure — node-json-app node-json-app/ 📦 app.js 🐳 Dockerfile 📄 package.json 📦 app.js Node.js HTTP server. Entry point of the application. Defines routes and serves JSON responses. const http = require('http') res.end(JSON.stringify(data)) server.listen(3000) 🐳 Dockerfile Containerizes the Node.js app. FROM node:alpine base image. COPY → npm install → CMD node app.js Exposes port 3000 📄 package.json Project manifest. Defines name, version, scripts, and dependencies. "start": "node app.js"
I built a RESTful JSON API with Node.js and containerized it with Docker. The goal was to understand how backend microservices are structured and packaged for deployment — skills directly applicable to building and maintaining services in a DevOps or backend engineering role.
This project demonstrates my ability to:
- Build a REST API in Node.js from scratch
- Containerize a JavaScript application with Docker
- Structure backend services for real-world deployment
- Think about services as independently deployable units — a core microservices principle
| Technology | Role |
|---|---|
| Node.js | Application runtime |
| JavaScript | Application logic |
| Docker | Containerization and portability |
node-json-app/
├── app.js # API routes and server logic
├── Dockerfile # Container image definition
└── package.json # Node.js dependencies
With Docker:
git clone https://github.com/Aijazkhan123/node-json-app.git
cd node-json-app
docker build -t node-json-app .
docker run -p 3000:3000 node-json-appWithout Docker:
npm install
node app.js- Add additional REST endpoints (POST, PUT, DELETE)
- Connect to MongoDB or PostgreSQL for persistent data
- Add request validation and error handling middleware
- Add GitHub Actions CI/CD pipeline
Node.js · REST API Design · Docker · JavaScript · Containerization · Microservices Architecture