Files
main.tsmain
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
Press Run tests to start the app. Its log appears here.Graded endpoints
The cats module's controller answers, so the module is reachable from the root and lists the controller
The cat is in the service's array
Every route of the controller came along with the module
AppController counts through the exported CatsService. One instance, shared: a second registration would count 0