0
votes

I wanted to see my Nodejs environment variables on Windows. Since I am running my Nodejs application in windows I figured I would see the environment variables but I cannot see any of my environment variables that I am using in Nodejs.

I am using the dotenv package to load my env variables. For example one of my env variable is

db_dev_database = myDB

But looking at my env variables in windows it is nowhere to be seen:

enter image description here

Where is this environment variable stored in windows?

1
If I didn't miss anything on your screenshot, you are missing your ENV variables. You have to add them manually on Windows as far as I know. You can add your db_dev_database environment variable by clicking on the New button. - danibrum

1 Answers

1
votes

Setting an environment variable in code or in some shell affects only this process (and its child processes) or a shell session. It works that way in Windows and in Linux.

If you wish to set an environment variable permanently for a certain user you need to add it in system settings (in Windows for instance) that you already shown us on the screenshot.