What carries over
Express habit NestJS equivalent Why it still matters
Middleware stack – app.use(fn) Middleware – app.use(fn) in the NestJS NestFactory or class‑based middleware ( implements NestMiddleware ) Nest sits on top of the same underlying Express (or Fastify) server, so the request‑response pipeline is identical.
Routing basics – app.get('/path', handler) Controllers & decorators – @Controller('path') + @Get() The HTTP verb mapping is the same; Nest just adds metadata via decorators.
Request/Response objects – req.body , res.json() Same objects – injected @Req() / @Res() give you the raw Express Request / Response You can still use req.params , res.status() , etc., when you need low‑level control.
Error handling – next(err) or error‑handling middleware Exception filters – @Catch() classes or built‑in HttpException The underlying mechanism still bubbles through Express, but Nest provides a structured way to centralise it.
Environment configuration – process.env , dotenv ConfigModule –…