1.0.0 • Published 4 years ago

envariable v1.0.0

Weekly downloads
3
License
AGPL-3.0
Repository
gitlab
Last release
4 years ago

envariable

npm version

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.

NameTypeDescriptionDefault
silentbooleanDo not print the names of read env variables.false
locationstringThe location where to look up the .env file.~
namestringThe 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