1.0.1 • Published 3 years ago

@tsigel/getenvprop v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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

3 years ago