title: How to bind url parameters to callback function in express/node.js?
body: <p>I have callback function which takes 4 parameters like </p>
  
  <pre><code>function findFriend(req, res, name, year) {
  // here I have tried to read
  
  }
  </code></pre>
  
  <p>and I want to bind to url like </p>
  
  <pre><code>app.get('/api/name/:name/year/:year/student', students.findFriend);
  </code></pre>
  
  <p>and I expect to bind name to name and year to year but it is undefined. I also have tried to read paramters as req.params.name and req.params.year (also req.query.name and req.query.year) but it is always undefined. How to bind url parameters to callback function ?</p>