When I try to submit the challenge on this step in Basic Node and Express, I get the following message:
// running tests
The response of the endpoint /json should change according to the environment variable MESSAGE_STYLE
// tests completed
My code does that, but the passoff isn’t accepting it for some reason. Below is the code snippet I use in the glitch app to get it to work.
app.get("/json", (req, res) => {
var response = "Hello json"
if (process.env.MESSAGE_STYLE == "uppercase") {
response = response.toUpperCase();
}
res.json({
message: response
});
})
What does freecodecamp want me to put as my answer then if it won’t accept this? The logs don’t show anything abnormal. A link to the project I’m using: https://glitch.com/~caring-occipital-gull