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.setGlobalPrefix('api/v1'); //swagger configuration const config = new DocumentBuilder() .setTitle('DCB webhook service') .setDescription( 'This is a service dedicated to the reception of callback from external source and sending to rabbitMQ', ) .setVersion('1.0') .build(); const document = SwaggerModule.createDocument(app, config); SwaggerModule.setup('api/docs', app, document); await app.listen(process.env.PORT ?? 3000); console.log(`Application is running on: http://localhost:3000`); console.log(`Swagger docs: http://localhost:3000/api/docs`); } bootstrap();