Tell us what’s happening:
Describe your issue in detail here.
on hint page, example like this
if (process.env.VAR_NAME === "allCaps") {
response = "Hello World".toUpperCase();
} else {
response = "Hello World";
}
but when i try to join with my code, the result has true. but fcc dont accept it.
this is my code:
app.get('/json',(req, res)=>{
var response = "Hello json";
console.log("aaa")
console.log(process.env.MESSAGE_STYLE === "uppercase")
if (process.env.MESSAGE_STYLE == "uppercase") {
response = "Hello World".toUpperCase();
} else {
response = "Hello World";
}
res.json({"message": response})
})
Your project link(s)
solution: https://replit.com/@nawaytes/boilerplate-express
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36
Challenge: Use the .env File
Link to the challenge: