feat: add api liveness and readiness checks

This commit is contained in:
Bastian Wagner
2026-08-17 13:39:15 +02:00
parent db6d62c303
commit 0815f702d2
12 changed files with 327 additions and 5 deletions

View File

@@ -1,10 +1,16 @@
import { RequestMethod } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import { ApiModule } from './api.module';
export async function bootstrapApi(): Promise<void> {
const app = await NestFactory.create(ApiModule);
app.enableShutdownHooks();
app.setGlobalPrefix('api/v1');
app.setGlobalPrefix('api/v1', {
exclude: [
{ path: 'health/live', method: RequestMethod.GET },
{ path: 'health/ready', method: RequestMethod.GET },
],
});
await app.listen(3000, '0.0.0.0');
}