Files
correos_api/src/main.ts
T

25 lines
777 B
TypeScript
Raw Normal View History

2025-02-27 12:41:56 -06:00
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
2025-03-11 15:47:32 -06:00
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
2025-02-27 12:41:56 -06:00
async function bootstrap() {
const app = await NestFactory.create(AppModule);
2025-03-11 15:47:32 -06:00
const config = new DocumentBuilder()
2025-03-15 12:02:41 -06:00
.setTitle('Documentacion de la api de votaciones_mails v2')
2025-03-11 15:47:32 -06:00
.setDescription(
'El proyecto ha sido refactorizado a una version mejorada con nestjs',
)
.setVersion('1.0')
.addTag('description')
.build();
const document = SwaggerModule.createDocument(app, config);
SwaggerModule.setup('documentation', app, document);
2025-03-10 13:39:53 -06:00
await app.listen(process.env.PORT ?? 3000);
2025-03-27 17:56:44 -06:00
console.log(`Aplicación corriendo en: http://localhost:${process.env.PORT ?? 3000}`);
2025-02-27 12:41:56 -06:00
}
bootstrap();