From 761a2984eecb05d220392ff0d9d11bd792d66294 Mon Sep 17 00:00:00 2001 From: NitiwatOwen Date: Fri, 10 Nov 2023 19:09:09 +0700 Subject: [PATCH] hot update --- .env.example | 4 +++- src/auth/auth.module.ts | 7 ++++--- src/main.ts | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.env.example b/.env.example index 6f886a3..f25866d 100644 --- a/.env.example +++ b/.env.example @@ -16,4 +16,6 @@ AUTH_GRPC_PORT="YOUR_AUTH_GRPC_PORT" USER_GRPC_PORT="YOUR_USER_GRPC_PORT" USER_REST_PORT="YOUT_USER_REST_PORT" -FILE_GRPC_URL="YOUR_FILE_GRPC_URL" \ No newline at end of file +FILE_GRPC_URL="YOUR_FILE_GRPC_URL" +EMAIL_SERVICE_RMQ="YOUR_EMAIL_SERVICE_RMQ" +EMAIL_QUEUE="YOUR_EMAIL_QUEUE" \ No newline at end of file diff --git a/src/auth/auth.module.ts b/src/auth/auth.module.ts index 1529b73..0d73c0f 100644 --- a/src/auth/auth.module.ts +++ b/src/auth/auth.module.ts @@ -5,7 +5,7 @@ import { AuthService } from './auth.service'; import { AuthController } from './auth.controller'; import { JwtModule, JwtService } from '@nestjs/jwt'; import { AccessTokenStrategy } from './strategies/accessToken.strategy'; -import { ConfigService } from '@nestjs/config'; +import { ConfigModule, ConfigService } from '@nestjs/config'; import { BlacklistRepository } from 'src/repository/blacklist.repository'; import { SportAreaListRepository } from 'src/repository/sportAreaList.repository'; @@ -17,13 +17,14 @@ import { FileModule } from '../file/file.module'; imports: [ PrismaModule, JwtModule.register({}), + ConfigModule.forRoot(), ClientsModule.register([ { name: 'EMAIL_SERVICE', transport: Transport.RMQ, options: { - urls: ['amqp://localhost:5672'], - queue: 'email_queue', + urls: [process.env.EMAIL_SERVICE_RMQ], + queue: process.env.EMAIL_QUEUE, queueOptions: { durable: false, }, diff --git a/src/main.ts b/src/main.ts index d2ee624..f8d5d45 100644 --- a/src/main.ts +++ b/src/main.ts @@ -23,7 +23,7 @@ async function bootstrap() { package: 'user', protoPath: join(__dirname, 'proto/user.proto'), url: `0.0.0.0:${ - process.env.USER_GRPC_PORT ? parseInt(process.env.USER_GRPC_PORT) : 8081 + process.env.USER_GRPC_PORT ? parseInt(process.env.USER_GRPC_PORT) : 8087 }`, }, };