title | description | created | updated |
---|---|---|---|
dotenv (Nodejs Library) |
dotenv loads the environment variables from .env file to process.env |
2019-06-21 |
2019-06-21 |
dotenv loads environment variables from .env file to process.env
npm install dotenv
Add the folllowing line in the beginning of your Node application. This loads the environemnt variables from .env
file to process.env
require('dotenv').config()
APPLICATION_PORT=8080
once this is defined you can access using process.env.APPLICATION_PORT