@tsigel/getenvprop
v1.0.1
Published
Get required property from env with exeption. Get typed property.
Downloads
3
Readme
Get env prop - package to get environment variables.
So that the code explicitly throws exceptions when there are no required variables for the service to work.
Example
import { getRequiredNumProp, getRequiredProp } from 'getenvprop';
export const PORT = getRequiredNumProp('SERVER_PORT');
export const DATA_BASE_HOST = getRequiredProp('DATA_BASE_HOST');