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


should change according to the environment variable


// tests completed"

Your project link(s)


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

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

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




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

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.