Loading backend/src/main.ts +8 −0 Original line number Diff line number Diff line import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; import { ServerConstants } from './constants/server.contants'; async function bootstrap() { const app = await NestFactory.create(AppModule); const config = new DocumentBuilder() .setTitle('Pueblos Magicos API') .setVersion('1.0') .build(); const document = SwaggerModule.createDocument(app, config); SwaggerModule.setup('api', app, document); await app.listen(ServerConstants.PORT); console.log(`Application is running on: ${await app.getUrl()}`); console.log(`API documentation at: ${await app.getUrl()}/api`); } bootstrap(); Loading
backend/src/main.ts +8 −0 Original line number Diff line number Diff line import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; import { ServerConstants } from './constants/server.contants'; async function bootstrap() { const app = await NestFactory.create(AppModule); const config = new DocumentBuilder() .setTitle('Pueblos Magicos API') .setVersion('1.0') .build(); const document = SwaggerModule.createDocument(app, config); SwaggerModule.setup('api', app, document); await app.listen(ServerConstants.PORT); console.log(`Application is running on: ${await app.getUrl()}`); console.log(`API documentation at: ${await app.getUrl()}/api`); } bootstrap();