CI / build (pull_request) Successful in 59s
Fastify and the Nest adapters bound 127.0.0.1, unreachable from a separate load generator; bind 0.0.0.0 so two-machine benchmarks work.
Adds scale-{green-tea,express} (step-vs-middleware depth sweeps that surfaced the O(n^2)) and green-tea-{bun,deno} (the same app served via serveBun/serveDeno, to benchmark across runtimes).
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
14 lines
630 B
TypeScript
14 lines
630 B
TypeScript
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, '0.0.0.0');
|
|
const server = app.getHttpServer();
|
|
console.log(`READY ${(server.address() as any).port}`);
|
|
}
|
|
main().catch((e) => { console.error(e); process.exit(1); });
|