Nestjs Microservices : Code change not reflecting in local server

Viewed 13

I just started working on Nestjs microservices Nest Version is 9.0 and the Node version is 16.0

I have created a service, and trying to make changes in code

App.module.ts

@Module({
  imports: [],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}

App.controller.ts

  @MessagePattern({ role: 'test', cmd: 'find_all' })
  async findAll() {
    logger.log('Hello, User!');
  }

Expected Output

Hello, User

Actual Output

Hello World

1 Answers

After searching many things, I found that We have to execute the below command

npm run build
&
npm run start

This resolved my issue

Related