nest-native-adapters
Nest 10 / 11 / 12 · Node.js 22+ / Bun 1.4+ · Experimental
Run NestJS on node:http or Bun.serve, without Express or Fastify.
- Only the HTTP layer changes
- Modules, DI, decorators, guards, pipes, interceptors, filters and the lifecycle are still Nest’s own.
- Node.js and Bun
NodeHttpAdapteronnode:http(Node.js 22+),BunHttpAdapteronBun.serve(Bun 1.4+).- Express-compatible behavior
- CORS, cookies, static files, uploads, versioning, SSE, views and trusted proxies behave like Nest’s Express adapter. Known differences are listed in Deviations from Express.
- Nest 10, 11 and 12
- Tested against NestJS 10, 11 and 12 on both runtimes.
Packages
Section titled “Packages”| Package | Adapter |
|---|---|
nestjs-adapter-node |
NodeHttpAdapter, backed by node:http |
nestjs-adapter-bun |
BunHttpAdapter, backed by Bun.serve |
npm install nestjs-adapter-node # or nestjs-adapter-bunimport { NestFactory } from "@nestjs/core";import { NodeHttpAdapter } from "nestjs-adapter-node";import { AppModule } from "./app.js";
const app = await NestFactory.create(AppModule, new NodeHttpAdapter());await app.listen(3000);