You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
610 B
17 lines
610 B
import { ValidationPipe } from '@nestjs/common';
|
|
import { NestFactory } from '@nestjs/core';
|
|
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
|
|
import { AppModule } from './app.module';
|
|
|
|
async function bootstrap() {
|
|
const app = await NestFactory.create(AppModule);
|
|
app.useGlobalPipes(new ValidationPipe({ transform: true }));
|
|
|
|
const config = new DocumentBuilder().build();
|
|
const document = SwaggerModule.createDocument(app, config);
|
|
SwaggerModule.setup('api', app, document);
|
|
|
|
await app.listen(3000);
|
|
console.log(`Application is running on: ${await app.getUrl()}`);
|
|
}
|
|
bootstrap();
|
|
|