Skip to content

No more headaches! Your best utility for parsing .env variables in Node JS. Code was built based from Laravel's ENV parsing principle.

License

Notifications You must be signed in to change notification settings

rguj/node-env-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

node-env-parser

No more headaches! Your best utility for parsing .env variables in Node JS. Code was built based from Laravel's ENV parsing principle.

Instruction

  1. Put this file at the root of the project folder the same level as main.js and .env file
  2. Prepend this code at the most top of your main.js file:
global.env = require('./node-env-parser').parse();
  1. You can access your .env variables anywhere in your project (server-side)
console.log(global.env.SAMPLE_KEY);
  1. Please suggest revisions of this code to enhance it

License

GNU GPLv3

About

No more headaches! Your best utility for parsing .env variables in Node JS. Code was built based from Laravel's ENV parsing principle.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published