Files
main.tsmain
What you'll learn
- Write an async factory provider and explain what Nest waits for before it constructs dependents and listens
- Chain async providers through inject so one waits for another
- Tell startup-time work, which belongs in an async provider, from per-request work, which does not
Press Run tests to start the app. Its log appears here.Graded endpoints
Nest waited for the async factory: the connection is open, and the seed's two cats are counted
The seed arrived, late but before the repository was built
Ids continue after the seed
Capacity still comes from the config