Skip to content

je4ngomes/environment-variable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ENV - Environment Variable

Usage

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

PORT=3000
HOSTNAME=test
DB_USER=test
DB_PASS=123456

In your code

require('./path-to-env.js').config(__dirname + './path-to-your/.env');

console.log(process.env.PORT); // "3000"

About

Easy way to parse and load .env file to node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages