Basic Node and Express - Serve JSON on a Specific Route

Tell us what’s happening:
code is’nt working

app.get(“/json”, (req, res) => {
res.json({
message: “Hello json”
});
});

Your project link(s)

solution: boilerplate-npm - Node.js Repl - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Challenge: Basic Node and Express - Serve JSON on a Specific Route

Link to the challenge:

wrong boilerplate, start at the beginning of the section please, and use the correct boilerplate

boilerplate

awesome, did you solve it?

No,
also, after this problem, none of the problems are proceeding with successful test though they are running properly on local machine , I think that’s a issue not in code but somewhere else.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.