Tell us what’s happening:
Not able to pass the env test its always failing.
Describe your issue in detail here.
I have followed most of the steps as mentioned and syntax and code is looking good. Below is my code.
app.get("/json", function(req, res) {
const messageStyle = process.env["MESSAGE_STYLE"];
if (messageStyle === "uppercase") {
res.json({
message: "Hello Json".toUpperCase()
});
} else {
res.json({
message: "Hello Json"
});
}
});
Your project link(s)
solution: https://boilerplate-express--ashishmishra96.repl.co
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Challenge: Basic Node and Express - Use the .env File
Link to the challenge: