Tell us what’s happening:
I have completed the challenge but the test is failing for no reason.
(I am 100% sure that the json response is only uppercase when the .env file has MESSAGE_STYLE
equals uppercase
.
Tried to switch between Glitch.io and repl.it with the same results.
When I tried CodeSandBox it didn’t launch at all, with this error message:
error fcc-learn-node-with-express@0.1.0: The engine “node” is incompatible with this module. Expected version “4.4.5”. Got “10.20.1”
I don’t mind skipping this challenge, but I do mind the fact that I won’t be able to get my certification because of it.
Your code so far
on .env file:
MESSAGE_STYLE=uppercase
on myApp.js file:
var response = "Hello json";
if (process.env.MESSAGE_STYLE == "uppercase"){
response = response.toUpperCase();
}
app.get("/json",(req,res)=>{
res.json({"message": response})
})
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.116 Safari/537.36
.
Challenge: Use the .env File
Link to the challenge: