/* eslint-disable prettier/prettier */ import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; async function bootstrap() { const app = await NestFactory.create(AppModule); app.enableCors({ origin: '*', methods: 'GET,HEAD,PUT,PATCH,POST,DELETE', credentials: true, allowedHeaders: 'Content-Type, Accept', }); const config = new DocumentBuilder() .setTitle('Portal Jurunense API') .setDescription('Documentação da API do Portal Jurunense') .setVersion('1.0') .addBearerAuth() .build(); const document = SwaggerModule.createDocument(app, config); SwaggerModule.setup('docs', app, document); await app.listen(9002); } bootstrap();