NestJS · Middle · Question 15 of 75
What's the usual convention for forRoot, register and forFeature?
- 1They are three names for the same thing and can be mixed freely
- ✓Correct answer:
forRootconfigures once for the whole app,registerconfigures per importing module,forFeatureadds feature-specific parts to a root configuration - 3
forFeaturemust be called inmain.ts
Explanation
It's a convention, not a rule, but following it makes modules predictable for other developers.