4.0.1 • Published 4 years ago
require-env-variable v4.0.1
Install
pnpm add require-env-variableor
yarn add require-env-variableor
npm install require-env-variableUsage
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).