Basic Node and Express - Use the .env File

Tell us what’s happening:

Current code:

app.get(“/json”, function(req, res) {
console.log("MESSAGE_STYLE: ", process.env.MESSAGE_STYLE);
let response = “hello json”
if(process.env.MESSAGE_STYLE === “uppercase”) {
let uppercaseResponse = response.toUpperCase()
res.json({“message”:uppercaseResponse})
} else {
res.json({“message”:response})
}
})

I am going through the API and Backend Course. ‘Use the .env file’ step. Going to the endpoint renders desierd results but the test won’t pass

###Your project link(s)

solution: https://3000-freecodecam-boilerplate-dimdz5wsjal.ws-us118.gitpod.io

Your browser information:

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

Challenge Information:

Basic Node and Express - Use the .env File

:man_facepalming: I wasn’t capatalizing the “h” in “Hello json” for the second response.

is:

let response = “hello json”

should be:

let response = “Hello json”