UNPKG

@sentzunhat/zacatl

Version:

A modular, high-performance TypeScript microservice framework for Node.js, featuring layered architecture, dependency injection, and robust validation for building scalable APIs and distributed systems.

14 lines (11 loc) 272 B
import config from "config"; type ConfigInput = { SERVICE_NAME: string; NODE_ENV: string; APP_VERSION: string; APP_ENV: string; CONNECTION_STRING: string; }; export const getConfigOrThrow = <T>(name: keyof ConfigInput): T => { return config.get<T>(name); };