@alexconlag/dotenv

1.0.3 • Public • Published

dotenv

This package is a zero-dependency module that loads environment variables from a .env file into process.env.

Install

$ npm i @alexconlag/dotenv

Usage

Create a .env file in the root of your project:

SECRET_KEY=YOURSECRETKEYGOESHERE
OTHER_VAR=HEREYOURVAR

As early as possible in your application, import and configure dotenv:

import { config } from "@alexconlag/dotenv";
config();

console.log(process.env);

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @alexconlag/dotenv

      Weekly Downloads

      2

      Version

      1.0.3

      License

      MIT

      Unpacked Size

      2.97 kB

      Total Files

      6

      Last publish

      Collaborators

      • alexconlag_user