Basic Node and Express - Use the .env File

Tell us what’s happening:
Describe your issue in detail here.
it seems my -url/json not showing with the current code
if I use the the res.json("HELLO WORLD) its worked , but the ‘else’ function not showing

Your project link(s)

solution: boilerplate-express - Node.js Repl - Replit

Your browser information:

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

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

Link to the challenge:

@ichsan2668 Answer the following two questions for me.

  1. What do the instructions say the response should look like when the environment variable MESSAGE_STYLE is equal to uppercase?

  2. What do the instructions say the response should look like when the environment variable MESSAGE_STYLE is not equal to uppercase?

  1. the message in uppercase
  2. just message without changes

should I define a message variable first?

I try to change the environment to check if the else working, but the console.log still shows the one in the if function

well the problem is the page my-url/json not loaded, I think I miss some code or something

Show me exactly what is supposed to be returned in this case as the response.

“messages”: “HELLO JSON”

No, that is not correct. Carefully read the instructions again. What data type should the response be?