How to use the @nestjs/microservices.ClientsModule.register function in @nestjs/microservices

To help you get started, weโ€™ve selected a few @nestjs/microservices examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nestjs / nest / sample / 03-microservices / src / math / math.module.ts View on Github external
import { Module } from '@nestjs/common';
import { Transport } from '@nestjs/common/enums/transport.enum';
import { ClientsModule } from '@nestjs/microservices';
import { MATH_SERVICE } from './math.constants';
import { MathController } from './math.controller';
  imports: [
    ClientsModule.register([{ name: MATH_SERVICE, transport: Transport.TCP }]),
  controllers: [MathController],
export class MathModule {}