Files
docmost/server/src/main.ts
2023-08-05 16:58:34 +01:00

28 lines
595 B
TypeScript

import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import {
FastifyAdapter,
NestFastifyApplication,
} from '@nestjs/platform-fastify';
import { ValidationPipe } from '@nestjs/common';
async function bootstrap() {
const app = await NestFactory.create<NestFastifyApplication>(
AppModule,
new FastifyAdapter({
ignoreTrailingSlash: true,
ignoreDuplicateSlashes: true,
}),
);
app.useGlobalPipes(
new ValidationPipe({
whitelist: true,
stopAtFirstError: true,
}),
);
await app.listen(3000);
}
bootstrap();