12 lines
421 B
TypeScript
12 lines
421 B
TypeScript
import { NestFactory, Reflector } from '@nestjs/core';
|
|
import { AppModule } from './app.module';
|
|
import { ClassSerializerInterceptor, ValidationPipe } from '@nestjs/common';
|
|
|
|
async function bootstrap() {
|
|
const app = await NestFactory.create(AppModule);
|
|
app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get(Reflector)));
|
|
app.useGlobalPipes(new ValidationPipe());
|
|
await app.listen(4000);
|
|
}
|
|
bootstrap();
|