@catbee/utils
Version:
A modular, production-grade utility toolkit for Node.js and TypeScript, designed for robust, scalable applications (including Express-based services). All utilities are tree-shakable and can be imported independently.
36 lines • 1.17 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Config = void 0;
const env_utils_1 = require("./utils/env.utils");
/**
* Application runtime configuration loaded from environment variables.
*/
exports.Config = {
Logger: {
/**
* Logging level (e.g., 'info', 'debug', 'warn', 'error').
*/
level: env_utils_1.Env.get("LOGGER_LEVEL", "info"),
/**
* Name of the logger instance (defaults to npm package name).
*/
name: env_utils_1.Env.get("LOGGER_NAME", env_utils_1.Env.get("npm_package_name", "@catbee/utils")),
/**
* Whether to use ISO 8601 timestamps in logs.
*/
isoTimestamp: env_utils_1.Env.getBoolean("LOGGER_ISO_TIMESTAMP", false),
},
Http: {
/**
* Timeout for HTTP requests in milliseconds
*/
timeout: env_utils_1.Env.getNumber("HTTP_TIMEOUT", 30000),
},
Cache: {
/**
* Default TTL (time to live) for cache entries in seconds
*/
defaultTtl: env_utils_1.Env.getNumber("CACHE_DEFAULT_TTL", 300),
},
};
//# sourceMappingURL=config.js.map