Tell us what’s happening:
freeCodeCamp is not happy with my code but as far as I can tell it should pass.
See the running instance here:
https://freckle-ripe-cirrus.glitch.me/json
Your code so far
/** 5) serve JSON on a specific route */
app.get("/json", (req, res) => {
let message = "Hello json";
if(process.env.MESSAGE_STYLE === "uppercase"){
message = message.toUpperCase();
}
res.json({"message": message});
});
Your browser information:
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0
.
Challenge: Use the .env File
Link to the challenge: