NestJS · Junior · Question 9 of 75

What does the @Module() decorator describe?

@Module({
  imports: [DatabaseModule],
  controllers: [UsersController],
  providers: [UsersService],
  exports: [UsersService],
})
export class UsersModule {}

Explanation

Modules are the unit of organization in Nest. Every app has at least one root module, usually AppModule.

Further reading

Problem with a question

NestJS · Junior · question 9

Test yourself

Take the NestJS · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz