Tell us what’s happening:
Code is ok. But test case failing.
Your code so far
pp.get("/json", (req, res) => {
if (process.env.MESSAGE_STYLE === “uppercase”) {
res.status(200).json({ message: “HELLO JSON” });
}
res.json({ message: “hello json” });
});
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36
.
Challenge: Use the .env File
Link to the challenge:
What is written in your .env file?
Try putting uppercase in quotes so that it reads
MESSAGE_STYLE=“uppercase”
See if that works.
I think the original had “Hello json” instead of “hello json”. When I tested both, it didn’t pass on “hello json”, but it did on “Hello json”.
That SHOULD be it, but if it isn’t I might need to see the repl.it code if you’re using repl.it for it.
1 Like
Sky020
#8
Hello there,
You need to change the package fcc-express-bground
to the new version we have here: https://github.com/freeCodeCamp/fcc-express-bground-pkg.git
Hope this helps
2 Likes
Thanks a lot man…!! Finally succesfull.