Https://www.freecodecamp.org/learn/apis-and-microservices/basic-node-and-express/use-the-.env-file

Https://www.freecodecamp.org/learn/apis-and-microservices/basic-node-and-express/use-the-.env-file
0

Tell us what’s happening:
I tried the code running a local server and when I go to the route (i.e. localhost:3000/json) it works as intended
but if I enter the link to the challenge input the tests dont pass

I tried the same with a glitch link with no luck

is the test broken?

Your code so far
.env

MESSAGE_STYLE=uppercase

/json handler

app.get("/json", (req, res) => {
  var message = "Hello json"
  var uppercase = process.env.MESSAGE_STYLE === 'uppercase'

  res.json({
    message: uppercase ? message.toUpperCase() : message
  });
});

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36.

Challenge: undefined

Link to the challenge: