NestJS 11 · Controllers, providers and modules

Wire things together in a module

A module declares its controllers and providers, and exports what other modules may use.

@Module({
  controllers: [CatsController],
  providers: [CatsService],
  exports: [CatsService],
})
export class CatsModule {}

Official NestJS 11 documentation

More controllers, providers and modules commands

All controllers, providers and modules commands · NestJS 11 cheatsheet

Was this page helpful?