How phamdanghoan/devops-nodejs works
This is a Node.js/Express product REST API backed by PostgreSQL. The main workflow is an HTTP request entering the server, being routed to product controllers, and executing CRUD queries through the model and database connection pool. The app also exposes health checks. README documents Docker Compose and a GitHub Actions-to-Docker Hub-to-Render deployment capability, but those are operational delivery concerns rather than runtime components, so they are omitted. Edges are based on sampled source and explicit README statements.
Main entry points: server.js HTTP server · app.js Express app · product.routes.js Product routes · product.controller.js Product controller
Components 9
API runtime
- HTTP server
src/server.js - Express app
src/app.js - Health endpoint
src/app.js
Product domain
- Product routes
src/routes/product.routes.js - Product controller
src/controllers/product.controller.js - Product model
src/models/product.model.js
Persistence
- PostgreSQL pool
src/config/database.js - PostgreSQL
Other components
- API client
Connections 8
- API client → HTTP server: sends HTTP
src/server.js - HTTP server → Express app: listens with
src/server.js - Express app → Product routes: mounts at prefix
src/app.js - API client → Health endpoint: checks status
src/app.js - Product routes → Product controller: dispatches handlers
src/routes/product.routes.js - Product controller → Product model: calls CRUD
src/controllers/product.controller.js - Product model → PostgreSQL pool: queries through
src/models/product.model.js - PostgreSQL pool → PostgreSQL: connects to
src/config/database.js