UNPKG

@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.

33 lines 992 B
import { Env } from "./utils/env.utils"; /** * Application runtime configuration loaded from environment variables. */ export const Config = { Logger: { /** * Logging level (e.g., 'info', 'debug', 'warn', 'error'). */ level: Env.get("LOGGER_LEVEL", "info"), /** * Name of the logger instance (defaults to npm package name). */ name: Env.get("LOGGER_NAME", Env.get("npm_package_name", "@catbee/utils")), /** * Whether to use ISO 8601 timestamps in logs. */ isoTimestamp: Env.getBoolean("LOGGER_ISO_TIMESTAMP", false), }, Http: { /** * Timeout for HTTP requests in milliseconds */ timeout: Env.getNumber("HTTP_TIMEOUT", 30000), }, Cache: { /** * Default TTL (time to live) for cache entries in seconds */ defaultTtl: Env.getNumber("CACHE_DEFAULT_TTL", 300), }, }; //# sourceMappingURL=config.js.map