Files
pcpuma_unam_api/src/main.ts
T

23 lines
768 B
TypeScript
Raw Normal View History

2022-03-29 11:27:49 -06:00
import { NestFactory } from '@nestjs/core';
2022-04-30 21:18:19 -05:00
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
2022-04-04 20:02:54 -05:00
import { ValidationPipe } from '@nestjs/common';
2022-03-29 11:27:49 -06:00
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
2022-04-30 21:18:19 -05:00
2022-08-07 21:22:40 -05:00
// 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);
2022-04-30 21:18:19 -05:00
2022-08-07 21:22:40 -05:00
// SwaggerModule.setup('/api', app, document);
2022-04-04 20:02:54 -05:00
app.useGlobalPipes(new ValidationPipe({ whitelist: true }));
2022-05-31 13:04:59 -05:00
app.enableCors();
2022-05-24 12:58:54 -05:00
await app.listen(process.env.API_PORT);
2022-03-29 11:27:49 -06:00
}
bootstrap();