I have tried to solve this challenge for a few days and looked at the help’s and link’s to other helps and was unable to find a solution to the problem. Any help is much appreciated.
Did you create a .env file, I did not see one in the root
app.get("/json", (req, res)=>{
//You should have res.json below the other code, or choose a
//different way of deciding when to uppercase
res.json({
"message": "Hello json"
});
//you did not call this function, but you should just make as
//it should be in the case of no uppercaase
var response='Hello json'.toUpperCase;
// your res.json should be below this
if (process.env.MESSAGE_STYLE==="uppercase"){
response=message.toUpperCase()
};
});
What is message.message also you could just use a ternary in your response. It seems like it will not show me your .env file so I will assume it is correct.
I saw it written that way in the first solution that I looked up when all I got were error messages. I thought that the first message was a command that I was unaware of