1.0.1 • Published 12 months ago
@tsigel/getenvprop v1.0.1
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');
1.0.1
12 months ago