Tell us what’s happening:
Hello whene the code say `
app.get("/json", (req, res) => {
res.json({
message: "Hello json"
});
});
is it to make an objet message : "Hello json"
at the url mydomain/json
.
to make an “API” where prgramm can get the object with a request GET at the url myDomain/json
?
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36
Challenge: Serve JSON on a Specific Route
Link to the challenge: