title: How to refactor app.getwith different routes but same actions in node.js
body: <p>I would like to simplify a piece of my code but not sure how to do it.
  I have</p>
  <pre><code>// Monitoring route
  app.get('/ping', (req, res)=&gt;{
    res.send('Hello World!');
  })
  
  // Route that receives a GET
  app.get('/getCar', (req, res)=&gt;{  routes.get(req, res);})
  app.get('/getCarList', (req, res)=&gt;{  routes.get(req, res);})
  app.get('/getDriver', (req, res)=&gt;{  routes.get(req, res);})
  app.get('/getDriverList', (req, res)=&gt;{  routes.get(req, res);})
  app.get('/getCarDriver', //do something else than the rest)
  </code></pre>
  <p>So what I would like is to get the four app.get doing the same thing together.
  I have starting by thinking of doing a function for the result like this :</p>
  <pre><code>var getSendRes = (req, res)=&gt;{  routes.get(req, res);}
  </code></pre>
  <p>But I think it would be better if I merged all app.get doing the same stuff together. Any idea ?</p>
  <p>Thanks,</p>