I have trouble passing the Basic Node and Express - Use the .env File

my answer was

let response = {
  message : "Hello json"
}

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

it always say that i have somthig wrong

Hey @cmdams, welcome to forum!

Something wrong like what? Can you specify the error message you see

hey @snigo thanks for the reply

when i click “submit and go to the next challege” it shows this message:

// running tests
The response of the endpoint /json should change according to the environment variable MESSAGE_STYLE
// tests completed

If I’am right the answer I’ve giving is suppose to be right!

Maybe you meant to do “Hello json” to upper case instead?

@snigo did that but still the same message appears

Perhaps you understood the question wrong.

The response of the endpoint /json should change according to the environment variable MESSAGE_STYLE

It sounds like it is saying “response of the endpoint /json” should change according to the env
Like…

if( env.MESSAGE_STYLE ) { 
   /* use this end point */
} else {
   /* use another end point */
}

not working
app.get(’/json’, (req, res) => {
let message = “Hello json”
if(process.env.MESSAGE_STYLE==‘uppercase’){
message = message.toUpperCase()
}
res.json({“message”: message})
})