Tell us what’s happening:
I’ve done this test a few times now with different variations on transforming the text into uppercase, and they’ve worked in the app and in my testing (changing the MESSAGE_STYLE environment variable so the text is “Hello json” instead of all uppercase works as intended), but none of them have passed the test in this challenge. I’m not sure why so I’d just like to figure it out.
A link to the /json path: https://nodev2.glitch.me/json
Thank you!
Your code so far
myApp.js :
if(process.env.MESSAGE_STYLE == 'uppercase'){
app.get("/json", function(req, res) {
res.json({"message": "HELLO JSON"})
})
} else{
app.get("/json", function(req, res) {
res.json({"message": "Hello json"})
})
}
.env:
MESSAGE_STYLE=uppercase
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
.
Challenge: Use the .env File
Link to the challenge: