Tell us what’s happening:
I have created a code for the .env challenge and the code works fine while I trigger the browser website. but when I submit link to freecodecamp, it says test failed.
Your code so far
/** 5) serve JSON on a specific route */
app.get("/json", (req, res) => {
var response = “Hello json”;
if (process.env.MESSAGE_STYLE === “uppercase”){
response = response.toUpperCase();
}
res.json({“message”: response});
});
in .env file : MESSAGE_STYLE=uppercase
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36.
As a matter of curiosity, are you using Glitch for your project? It seems they are currently facing some stability issues which may be causing your tests to fail.
If you’d like, I’d be more than happy to look over your code if you provide the link to your project.
Would you mind changing this line in your package.json: "fcc-express-bground": "https://github.com/freeCodeCamp/fcc-express-bground-pkg.git",
To this: "fcc-express-bground": "https://github.com/Sky020/fcc-express-bground-pkg.git",