0.0.2 • Published 2 years ago
@deanacus/env v0.0.2
@deanacus/env
Just a little safety wrapper around
dotenv
.
Takes a key, and an optional path, loads .env
if it hasn't already, then
checks for the existance of key
on process.env, and throws if it doesn't
exist.
Install
npm install @deanacus/env
Usage
import { getEnv } from '@deanacus/env';
// ...
const envValue = getEnv('key', 'optional/path/to/.env');