title: How can I route all calls starting with string api to their handlers in an express middleware
body: <p>I have a express app.js with typical </p>
  
  <pre><code>app.get('/path1', (req, res =&gt; {}) 
  app.get('/path2', (req, res =&gt; {}) 
  app.get('/path3', (req, res =&gt; {}) 
  </code></pre>
  
  <p>now I want to catch all routes, starting with api such as below and redirect them to their corresponding handler in express but not sure how to achieve that </p>
  
  <pre><code>/api/path1 
  /api/path2 
  /api/path3 
  </code></pre>
  
  <p>I' assuming i can have a catch all api as below </p>
  
  <pre><code>app.all('/api/*', function (request, response, next) { //in a server.js file 
         //how can i call the corresponding paths here?? 
         // looking for something to do forward to current-route.replace('api','') 
         // or something like that 
  })
  </code></pre>