23 lines
515 B
TypeScript
23 lines
515 B
TypeScript
|
import { Module } from '@nestjs/common';
|
||
|
import { AppController } from './app.controller';
|
||
|
import { ClientsModule, Transport } from "@nestjs/microservices";
|
||
|
import { AppService } from './app.service';
|
||
|
|
||
|
@Module({
|
||
|
imports: [
|
||
|
ClientsModule.register([
|
||
|
{
|
||
|
name: "MICROSERVICE_A",
|
||
|
transport: Transport.TCP,
|
||
|
options: {
|
||
|
host: "127.0.0.1",
|
||
|
port: 8888
|
||
|
}
|
||
|
}
|
||
|
])
|
||
|
],
|
||
|
controllers: [AppController],
|
||
|
providers: [AppService],
|
||
|
})
|
||
|
export class AppModule {}
|