loading...

Using dotenv to manage environment variables in Nodejs

Hridayesh Sharma on April 27, 2020

Have you ever faced any of these scenarios: You have some dynamic values in your code which you don't want to hardcode. You have API K... [Read Full]
markdown guide
 

I use dotenv in all of my Node projects now!

 
 

How to change env variables according to environment using dotenv

 

You can use dotenv-flow for that. I have updated the post for the same.

 

I just learned about dotenv a few days ago and started using it but now, with dotenv-flow that will really be great ! Thanks a lot for that

 

Glad that this post helped you. :)

 

After read this article, i starting use dotenv, thanks

 

Thanks denid. This is a great motivation for me. πŸ˜ƒ

 

How to Access the ENV var in different files in Node.js using dotenv?

 

Hi Kiran You can access ENV variables like process.env.VARIABLE_NAME once you load dotenv in your file.

code of conduct - report abuse