Reputation: 445
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:
Where is this environment variable stored in windows?
Upvotes: 0
Views: 687
Reputation: 22803
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.
Upvotes: 1