Implement health check service and global exception handling

This commit is contained in:
Nils-Johan Gynther
2026-04-10 18:14:48 +02:00
parent 650a1bb55c
commit 2efb5b5627
10 changed files with 327 additions and 36 deletions
+5
View File
@@ -1,11 +1,16 @@
import { ValidationPipe } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { GlobalExceptionFilter } from './common/filters/global-exception.filter';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.setGlobalPrefix('api');
// Registrera global exception filter
app.useGlobalFilters(new GlobalExceptionFilter());
app.useGlobalPipes(
new ValidationPipe({
whitelist: true,