I don’t understand how to set the route parameter and take the information and send it via JSOn.
Your code so far
app.post("/:word/echo", (req, res) => {
res.json({echo : req.params.word})
})
** Instructions **
Build an echo server, mounted at the route GET /:word/echo . Respond with a JSON object, taking the structure {echo: word} . You can find the word to be repeated at req.params.word . You can test your route from your browser’s address bar, visiting some matching routes, e.g. your-app-rootpath/freecodecamp/echo .
Challenge: Get Route Parameter Input from the Client
Link to the challenge: