Basic Node and Express - Use the .env File

Tell us what’s happening:
Describe your issue in detail here.
Hi guys, please I need help with the .env file challenge …
I created the .env file and in it (the first line) in have exactly this code “MESSAGE_STYLE=uppercase” - - without the quotes.

In my “myApp.js” file, I have “app.get(”/json", (req, res) => {
“message” : process.env.MESSAGE_STYLE=uppercase ? “Hello json”.toUpperCase() : “Hello json”

but my code is still not updating the /json path… what am I doing wrong?
Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0

Challenge: Basic Node and Express - Use the .env File

Link to the challenge:

Oh! thank you, I’ve got it I should have used “===” and the “uppercase” value in the .js file should have been in quotes since it’s not in a .env file… Thank you for taking the time.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.