Hello, I’m in the NodeJs course right now, and trying to update my NODE_ENV enviornment Variable with no success… every time I update it in the CMD or even Windows PowerShell it seems like it did it, and then nothing happens in the NodeJS Express Demo build in the course.
the question I guess i’m asking, is if anyone did this course, how did you cionfigure your ENV VARs??
Hi, mosh said if you’re on windows use set and if you’re on mac use export keyword to set your environment variable, i did try set keyword and nothing happend but then i used export keyword and it worked.
And coming to think of it i think i used a different command line.
So just try these and if this didn’t work come back and we’ll look into it and fix the issue
@yairtete There are two things you need to keep in mind here.
You must set the environment variable and then start the node server from that console instance itself . If you set the variable on one CMD window but open another CMD window to run your node server, it will be unable to detect the environment variable.
The methods for setting an environment variable on CMD and powershell are different.