Skip to content

Environment Variables

@zugriff/env

This package is part of the zugriff ecosystem. It runs on your machine using the dotenv package and on Edge Runtimes using a vendor-native approach.

Usage

Terminal window
npm i --save @zugriff/env

Loading Environment Variables

import { loadEnvironment } from '@zugriff/env';
await loadEnvironment();
console.log(process.env.HELLO);

You can also retreive environment variables from a specific location by providing a dotenv configuration object.

await loadEnvironment({ path: '.env.development' });