()
| 17 | import { AppModule } from "./app.module"; |
| 18 | |
| 19 | async function bootstrap() { |
| 20 | const app = await NestFactory.create(AppModule, { bufferLogs: true }); |
| 21 | app.useLogger(app.get(AmplicationLogger)); |
| 22 | |
| 23 | app.connectMicroservice<MicroserviceOptions>({ |
| 24 | strategy: new KafkaCustomTransport(createNestjsKafkaConfig().options), |
| 25 | }); |
| 26 | |
| 27 | await app.startAllMicroservices(); |
| 28 | |
| 29 | const configService: ConfigService = app.get<ConfigService>(ConfigService); |
| 30 | const port = configService.get(Env.PORT); |
| 31 | await app.listen(port); |
| 32 | } |
| 33 | |
| 34 | bootstrap().catch((error) => { |
| 35 | new Logger({ component: Env.SERVICE_NAME, isProduction: true }).error( |
no test coverage detected