1.0.1 • Published 2 years ago

env-importer v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

env-importer

This small package loads your enviroment variables from the .env file into process.env, without the help of any other npm dependency!

Installing

npm i env-importer

Importing all enviroment variables with 1 line of code

require('env-importer').load()

Usage

In the .env file:

type=small
password=sussy
this is a comment

And then in index.js

require('env-importer').load()
console.log(process.env) // { type: 'small', password: 'sussy' } 

Getting the package version

console.log(require('env-importer').version)