Tell us what’s happening:
I can’t seem to be able to find the .env file and I can’t seem to be able to get the correct code either. Can you please explain to me what’s happening here?
Your code so far
Your browser information:
User Agent is:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36.
Challenge: Use the .env File Link to the challenge:
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
You haven’t created one, that’s why it’s not there. Then you just write exactly what it says to write in that file (assign the value
uppercase to the variable
Oh, so I create a .env file and name it whatever I want and then add the key?
No, no, you call it .env, it’s a .env file
.env, that’s the file
K thanks. I’ll try that. I was just wondering since usually all files have a name and then a file type like
Sorry to bother you again, but I don’t exactly know what the challenge wants me to do in the myApp.js file. I looked at the hint and tried to get it to work, but I’m still stuck.
You can access the values defined in the env file in your JS code using
process.env.WHATEVER_THE_VARIABLE_IS_CALLED. So you need to check what the variable is and do the thing if the value is “uppercase”
Thank you for taking your time to help me. I got it.