Concurrency model: event loop. One thread runs your JavaScript; I/O is handed to libuv and completions come back as callbacks. Everything distinctive about backend JS follows from that one fact — async-by-default APIs, “never block the event loop,” cluster for multi-core, worker_threads for CPU work.
Sections
- 01 — Node Runtime — the platform Express and Nest both sit on
- 02 — Express — minimal: a router and middleware, everything else is yours
- 03 — Nest — opinionated: DI container, modules, decorators. Angular’s structure for the backend
Choosing between them
Express when the team is small and you want control — you’ll assemble your own structure, which is fine if you know what you’re assembling. Nest when several people share the codebase and you want the layering, DI, and conventions decided for you. Nest costs more to learn and pays back in consistency; that’s a team-size call, not a technical one.
Also worth knowing: Fastify (faster, schema-first validation), Hono (edge runtimes), and that Nest can run on a Fastify adapter instead of Express.
Related
Software engineering
Infrastructure & security
Computer science
Hardware & engineering