Tell us what’s happening:
Code originally working as challenge described. Can’t pass the challenge. Resorted to pasting in known working solutions, and it still won’t pass.
/** 5) serve JSON on a specific route */
// app.get('/json', (req, res) => {
// let data = {"message": "Hello json"};
// res.json(data);
// });
/** 6) Use the .env file to configure the app */
app.get("/json", function(req, res) {
var myMessage = 'Hello json';
if (process.env.MESSAGE_STYLE === 'uppercase') {
res.json({message: myMessage.toUpperCase()});
}
res.json({message: myMessage});
});
Your code so far
Your browser information:
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0.
I had tried this previously, I will revisit it today as I try and work past the external stumbling blocks surrounding these challenges. In any case, thank you very much for contributing towards a solution!
I don’t know well, but you may read the reply of the following links about it, specially the reply of few minutes ago looking for alternative to glitch