Hello guys! Can you guys help me with this challenge?
Been working on it a while and no success.
I stored the variable MESSAGE_STYLE in the .env file.
MESSAGE_STYLE=uppercase
then after in my App.js, i make the configuration requested
app.get('/json', function(req, res){
if(process.env.MESSAGE_STYLE === 'uppercase'){
res.json({"message":"HELLO JSON"});
}
else{
res.json({"message":"Hello json"});
}
});
but it keeps telling me this below:
Why did i do wrong?? Can you help me find out?? Thanks in advance!
This is the glitch lnk
Challenge: Use the .env File
Link to the challenge:
https://www.freecodecamp.org/learn/apis-and-microservices/basic-node-and-express/use-the-.env-file
