dcb-service-notification/src/main.ts
2025-10-24 13:16:47 +00:00

29 lines
858 B
TypeScript

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();