23 lines
768 B
TypeScript
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();
|