Basic Node and Express - Use the .env File [SUPPORT]

Hello guys! Can you guys help me with this challenge?

Been working on it a while and no success.
I stored the variable MESSAGE_STYLE in the .env file.


then after in my App.js, i make the configuration requested

app.get('/json', function(req, res){
   if(process.env.MESSAGE_STYLE === 'uppercase'){
     res.json({"message":"HELLO JSON"});
     res.json({"message":"Hello json"});

but it keeps telling me this below:

Why did i do wrong?? Can you help me find out?? Thanks in advance!
This is the glitch lnk

Challenge: Use the .env File

Link to the challenge:

Hello there,

This is a known issue: Use the .env File Test Will Not Pass

Use the .env File will not pass

Basic Node and Express - Use the .env File get error Cannot set headers after they are sent to the client

Thank you! I used and it worked just fine!

That’s all well and good till you find out that you’re using and it’s still not working.
I have the same code as @birkhoff just in ES6 syntax.
Nonetheless I will provide the link.
error for the right thing?

Welcome there,

I passed the tests with your code - after adding the .env file and MESSAGE_STYLE variable

If you are still struggling with this, please open your own topic, ensuring to provide a link to your own code. This thread is outdated, as such, I am closing it.

Thank you.