Tell us what’s happening:
I’m getting a 500 response when submitting my repl url from fCC.
When accessing the endpoint in the browser, the correct json object is returned.
app.get("/json", function(req, res) {
let response = "Hello json"
if(process.env.MESSAGE_STYLE == "uppercase"){
response = response.toUpperCase();
}
res.json({"message": response});
})
Your project link(s)
solution: https://boilerplate-express.hyetigran.repl.co/json
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.152 Safari/537.36
.
Challenge: Use the .env File
Link to the challenge: