Basic Node and Express - Get Route Parameter Input from the Client - Code doesn't work

Tell us what’s happening:
Describe your issue in detail here.
I don’t know why my code doesn’t work. Here is my GET route :

app.get(‘/:word/echo’,(req,res)=>{
const {word} = req.params;
res.json({
echo:word
});
});

Your project link(s)

solution: https://96af-201-66-34-40.sa.ngrok.io/freecodecamp/echo

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0

Challenge: Get Route Parameter Input from the Client

Link to the challenge:

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