Basic Node and Express - Use the .env File

Tell us what’s happening:

Hi guys. I’ve been stuck on this for a while. I created .env file with MESSAGE_STYLE=uppercase
Then, i used the following code:

app.get('/json', (req, res) => {
  let message = 'Hello json';
  (process.env.MESSAGE_STYLE === 'uppercase') 
  ? message=message.toUpperCase() 
  : message=message;
  res.json({'message': message});
  });

But i keep on getting this error:
The response of the endpoint /json should change according to the environment variable MESSAGE_STYLE
Please help! i’m using Gitpod

###Your project link(s)

solution: https://3000-freecodecam-boilerplate-1zidflin9dg.ws-eu115.gitpod.io

Your browser information:

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

Challenge Information:

Basic Node and Express - Use the .env File

can you follow this step:

At the top of your myApp.js file, add require('dotenv').config() to load the environment variables.

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 (').