How ljcl79/api-nodejs-express-typeorm-mysql works
Project type and purpose
• This is a backend-only REST API built with Node.js, Express.js and TypeScript, using TypeORM to talk to a PostgreSQL database.
• It exposes CRUD operations for three primary resources: Estudiantes (students), Profesores (professors) and Cursos (courses).
File structure
• src/index.ts: application entry point that loads the Express server.
• src/app.ts: configures Express (JSON parsing, middleware).
• src/routes/*.ts: defines HTTP routes for each resource.
• src/controllers/*.ts: houses the request handlers (create, read, update, delete).
• src/models/*.ts: TypeORM entity definitions for each table.
• src/db/conexion.ts: initializes and exports the TypeORM connection.
• build/index.js: compiled output for production.
• tsconfig.json / package.json: build & dependency config.
README for additional insights
• Uses TypeORM for entity-relationship mapping (1-N, N-M).
• PostgreSQL is the production datastore.
• Architecture follows a standard MVC pattern:
• Model = TypeORM entities
• Controller = business logic + ORM queries
• View = not applicable (API only)
• Routes = HTTP interface
Detailed capture of essential elements
• Don’t just show “API” and “DB” – break the API into Router → Controller → ORM.
• Types of entity relationships (1-N between Profesor→Cursos, N-M between Estudiante↔Curso).
• Call out the TypeORM connection module (src/db/conexion.ts) as the bridge to PostgreSQL.