1.0.0 • Published 5 years ago
envariable v1.0.0
envariable
envariable
is Read .env Into Environment Variables.
yarn add envariable
npm i envariable
Table Of Contents
API
The package is available by importing its default function:
import envariable from 'envariable'
envariable( config: !Config,
): void
Read .env
Into Environment Variables (in process.env
).
- config* !Config: Options for the program.
Config
: Options for the program.
Name | Type | Description | Default |
---|---|---|---|
silent | boolean | Do not print the names of read env variables. | false |
location | string | The location where to look up the .env file. | ~ |
name | string | The name of the .env file. | .env |
For example, consider the usage for the following .env
file:
HELLO=WORLD
import envariable from 'envariable'
envariable({
location: 'example',
})
console.log(process.env.HELLO)
[+] HELLO
WORLD
Copyright & License
GNU Affero General Public License v3.0
1.0.0
5 years ago