Modules — Basics · NestJS

Declare a feature module that owns the cats code, import it from the root module, and export the service so another module shares the same instance.

What you will learn

Read the theory for Modules

All Basics lessons

All NestJS courses

loading types…

What you'll learn

  • Declare a feature module that owns its controllers and providers
  • Import a module into the root module so its routes exist
  • Export a provider so a module that imports yours injects the same instance, and know why registering it twice is wrong