CodeZettaInterview Hub

NestJS · Modules · Junior · Best Practice

What are global modules and when are they appropriate?

Short Interview Answer

Modules marked @Global() export providers everywhere without re-importing — use sparingly for cross-cutting infra.

Detailed Explanation

Config, logging, and database modules are common. Overusing globals hides dependencies and hurts testability.

Did you know this answer?