NestJS · Junior · Question 11 of 75
What does @Global() on a module do?
- 1It exposes the module's routes without a prefix
- ✓Correct answer: Its exported providers become available in all modules without importing the module
- 3It makes the module run on all CPU cores
Explanation
Use it sparingly, for things like configuration or a database connection. Explicit imports make dependencies easier to follow.