feat(bench): add NestJS (platform-express + platform-fastify) servers

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-07-06 23:30:40 -05:00
1 parent 7593d1425a
commit fe1831a80a
7 files changed
+737 -1

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
import 'reflect-metadata';
import { NestFactory } from '@nestjs/core';
import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify';
import { BenchModule } from './_nest-shared';
async function main() {
const adapter = new FastifyAdapter({ logger: false, keepAliveTimeout: 5000 }); // parity via constructor
const app = await NestFactory.create<NestFastifyApplication>(BenchModule, adapter, { logger: false });
await app.listen(0, '127.0.0.1');
const server = app.getHttpServer();
console.log(`READY ${(server.address() as any).port}`);
}
main().catch((e) => { console.error(e); process.exit(1); });