require-env-variable
v3.0.1 dotenv environment variables process typescript
Install
pnpm add require-env-variable
or
yarn add require-env-variable
or
npm install require-env-variable
Usage
import { requireEnv } from "require-env-variable";
const { NODE_ENV, SSLKEY, SSLCERT, PORT } = requireEnv(
"NODE_ENV",
"SSLKEY",
"SSLCERT",
"PORT"
);
Returns the environment variables specified, but if any of the environment variables are not defined, the process exits (throws a catchable error).
npm i [email protected]
Source Code
github.com/PabloSzx/require-...Metadata
- MIT
- Whatever
- Unknown
- released 12/6/2019