Use the .env File Challenge

I did the challenge and getting the output as it should but when I paste the link to freecodecamp’s I have completed this challenge it kept saying this " // running tests The response of the endpoint

/json

should change according to the environment variable

MESSAGE_STYLE

// tests completed"

Your project link(s)

solution: https://replit.com/@sdahirsalman/boilerplate-express-5json

if (process.env.MESSAGE_STYLE === "uppercase"){

app.get("/json", (req, res) => {

res.json({message: "HELLO WORLD"})

});

}

else{

app.get("/json", (req, res) => {

res.json({message: "hello world"})

});

}

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:94.0) Gecko/20100101 Firefox/94.0

Challenge: Use the .env File

Link to the challenge:

Take a closer look at the instructions, how message should be capitalized when MESSAGE_STYLE environment variable is not set to uppercase.

use ‘if-else’ conditioning inside the get request

The message required is the same from the previous challenge, not hello world