diff --git a/packages/logging-service/src/app.module.ts b/packages/logging-service/src/app.module.ts index 9b429371..0c79e8f9 100644 --- a/packages/logging-service/src/app.module.ts +++ b/packages/logging-service/src/app.module.ts @@ -2,24 +2,9 @@ import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { LoggingModule } from './modules/logging/logging.module'; -import { ClientsModule, Transport } from '@nestjs/microservices'; -import { JUNO_LOGGING_PACKAGE_NAME } from 'juno-proto/dist/gen/logging'; -import { LoggingProtoFile } from 'juno-proto'; @Module({ - imports: [ - LoggingModule, - ClientsModule.register([ - { - name: 'LOGGING_SERVICE', - transport: Transport.GRPC, - options: { - package: JUNO_LOGGING_PACKAGE_NAME, - protoPath: [LoggingProtoFile], - }, - }, - ]), - ], + imports: [LoggingModule], controllers: [AppController], providers: [AppService], }) diff --git a/packages/logging-service/src/main.ts b/packages/logging-service/src/main.ts index d0566808..c507d082 100644 --- a/packages/logging-service/src/main.ts +++ b/packages/logging-service/src/main.ts @@ -3,6 +3,8 @@ import { AppModule } from './app.module'; import { MicroserviceOptions, Transport } from '@nestjs/microservices'; import { join } from 'path'; import { ConfigModule } from '@nestjs/config'; +import { LoggingProtoFile } from 'juno-proto'; +import { JUNO_LOGGING_PACKAGE_NAME } from 'juno-proto/dist/gen/logging'; async function bootstrap() { ConfigModule.forRoot({ @@ -13,8 +15,8 @@ async function bootstrap() { { transport: Transport.GRPC, options: { - package: [], - protoPath: [], + package: JUNO_LOGGING_PACKAGE_NAME, + protoPath: [LoggingProtoFile], url: process.env.LOGGING_SERVICE_ADDR, }, }, diff --git a/packages/logging-service/src/modules/logging/logging.controller.ts b/packages/logging-service/src/modules/logging/logging.controller.ts index 4a78134a..a04a60f9 100644 --- a/packages/logging-service/src/modules/logging/logging.controller.ts +++ b/packages/logging-service/src/modules/logging/logging.controller.ts @@ -1,7 +1,6 @@ import { Controller } from '@nestjs/common'; import { LoggingService } from './logging.service'; import { LoggingProto } from 'juno-proto'; -import { Observable } from 'rxjs'; @Controller() @LoggingProto.LoggingServiceControllerMethods()