NestJS wraps the underlying HTTP framework behind an HttpAdapter interface. Core functionality like DI, decorators, and lifecycle is framework-independent. The adapter translates NestJS abstractions to Express or Fastify internals. You switch platforms by passing a different adapter to NestFactory.create() with no application code changes.
NestJS defines an AbstractHttpAdapter interface that both Express and Fastify implement.
Controllers, guards, interceptors, and pipes work identically on both platforms.
Only platform-specific code (e.g., using @Req(), @Res() directly) breaks portability.
Fastify is significantly faster than Express but has a smaller ecosystem of middleware.