title: In express how do I redirect a user to an external url?
body: <p>I have a payment system using node.js and braintree, when the payment is successful I want to send the user to the back end. My back end is setup elsewhere. </p>
  
  <p>I have tried </p>
  
  <pre><code>res.writeHead(301,
    {Location: 'http://app.example.io'}
  );
  res.end();
  </code></pre>
  
  <p>So window.location is obviously not available. I cant think of any ways to redirect a user?</p>