Files
pcpuma_unam_api/src/main.ts
T
2022-08-07 21:22:40 -05:00

23 lines
768 B
TypeScript

import { NestFactory } from '@nestjs/core';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import { ValidationPipe } from '@nestjs/common';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
// const config = new DocumentBuilder()
// .setTitle('pcpuma_unam_api')
// .setDescription('Api de Pc puma')
// .setVersion('1.0')
// .addBearerAuth({ bearerFormat: 'JWT', type: 'http' }, 'jwt')
// .build();
// const document = SwaggerModule.createDocument(app, config);
// SwaggerModule.setup('/api', app, document);
app.useGlobalPipes(new ValidationPipe({ whitelist: true }));
app.enableCors();
await app.listen(process.env.API_PORT);
}
bootstrap();