Basic Node and Express - Use the .env File

Tell us what’s happening:

i have cerated .env file and my code is

app.get("/json", (req, res) => {
  var message = "hello json";
  if(process.env.MESSAGE_STYLE==="uppercase"){
    res.json({
      "message" : message.toUpperCase()
    });
  }
  else{
    res.json({
      "message" : message
    });
  }
});

can anyone please tell me where i am wrong?

###Your project link(s)

solution: https://3000-freecodecam-boilerplate-0bek7vvql8t.ws-us110.gitpod.io

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36

Challenge Information:

Basic Node and Express - Use the .env File

Can you share a screenshot of the file directory and .env file contents?

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').