freeCodeCamp/guide/english/certifications/apis-and-microservices/basic-node-and-express/get-route-parameter-input-f.../index.md

776 B

title
Get Route Parameter Input from the Client

Get Route Parameter Input from the Client

If someone tells you to build a GET or POST you would do app.get(...) or app.post(...) accordingly. The basic structure of the challenge is:

app.get("/:word/echo", function(req, res) {
  // word = req.params.word;
  // respond with the json object
});

Help our community expand these hints and guides.