Node - Use this .env - problem

Tell us what’s happening:
For the Node Basics - Use this .env. The JSON call gives the intended answer but does not clear as correct answer. Please help me figure out where I am going wrong here.

Link to Glitch Project

Your code so far

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

env file looks like this:
https://d.pr/i/21z8Qz+

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.98 Safari/537.36.

Challenge: Use the .env File

Link to the challenge:

I had exactly same issue coming up earlier this week and someone has mentioned to me that it is an issue with Glitch and there are already multiple people mentioned this issue.

1 Like

Try without a (" ") at the above point.

Thank you, Konstantin! Looks like Glitch is glitching a lot today even otherwise for me :).

I tried that @thetradecoder. Does not seem to work :frowning: ?

No worries :slight_smile:

Glitch is also glitching for me, hope this issue will be fixed soon.

Here is an alternative solution, read the reply of (pvsagar92) here alternative to glitch to solve .env challenge

Here is another way to do it alternative to glitch for basic node and express challenges

1 Like