Tell us what’s happening:
Why won’t this code pass the FCC tests?
It works in the browser
app.get(‘/json’, (req,res) => {
if (process.env.MESSAGE_STYLE === ‘uppercase’) {
res.json({“message” : “HELLO JSON”})
}
else {
res.json({“message”:“hello json”})
}
})
https://boilerplate-express.cghayden.repl.co
Your project link(s)
solution: https://boilerplate-express.cghayden.repl.co
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15
Challenge: Basic Node and Express - Use the .env File
Link to the challenge: