From ceaf85b4d8f4f41628209d319a5ca4aa7ea2f612 Mon Sep 17 00:00:00 2001 From: anasabbal Date: Sat, 15 Jun 2024 16:38:17 +0100 Subject: [PATCH] implemente consumer and producer using rabiit for sending email as notification --- .github/workflows/ci.yml | 2 +- apps/auth/src/main.ts | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c26b66b..919ffaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: - app: [driver, notification, nuber-app, ride, user-service] + app: [driver, notification, nuber-app, ride, user-service, auth] steps: - name: Checkout code diff --git a/apps/auth/src/main.ts b/apps/auth/src/main.ts index 3377d9d..e22687e 100644 --- a/apps/auth/src/main.ts +++ b/apps/auth/src/main.ts @@ -1,8 +1,17 @@ import { NestFactory } from '@nestjs/core'; import { AuthModule } from './auth.module'; +import { MicroserviceOptions, Transport } from '@nestjs/microservices'; async function bootstrap() { - const app = await NestFactory.create(AuthModule); - await app.listen(3000); + const app = await NestFactory.createMicroservice( + AuthModule, + { + transport: Transport.TCP, + options: { + port: 3004, + }, + }, + ); + await app.listen(); } bootstrap();