Resumen
Qué controla este paquete en el runtime
Config centralizes environment loading and validation so applications fail fast when required variables are missing or invalid. It exposes a typed ConfigService through DI and supports env-file loading plus optional prefixed variable mapping.
Qué ofrece
- ConfigModule.register() and ConfigModule.registerAsync() provide synchronous and factory-driven bootstrap flows.
- Schema validation runs before traffic is served, so invalid env state fails startup early.
- InjectConfigService() and getConfigService() expose typed values inside DI-managed services.
- Prefix mapping can resolve logical keys from prefixed variables such as DB_HOST and DB_PORT.
Cómo encaja
- Used across upstream samples to register NODE_ENV, PORT, and runtime tuning variables before CreateApplication().
- Fits naturally with @xtaskjs/core lifecycle because config validation runs before route handling begins.
- Pairs with @xtaskjs/security, @xtaskjs/typeorm, and other modules to centralize credentials and endpoint settings.