title: Node.js as a forwarding proxy but changing the URL path?
body: <p>How do i let node.js act as a proxy and forward all requests sent from one server to another server but stripping /couchdb/ from the url path so that for example POST /couchdb/mydatabase will be POST /mydatabase. And when it receives the response it should send it to the first server.</p>
  
  <p>All I have done is this (using express) to get all requests where the URL path starts with /couchdb/</p>
  
  <pre><code>app.all(/^\/couchdb\/(?:.)*/, function(req, res) {
  
  });
  </code></pre>
  
  <p>Could someone guide me through. Thanks</p>