title: Create object to append to both HTTP and HTTPS Express Servers in Node.js
body: <p>Ok, so I have a node.js app with two express servers.  One that listens on port 80 (HTTP) and one that on port 443 (HTTPS).</p>
  
  <p>Now, these do NOT have all the same routes.  Quite the contrary, most things are served over HTTPS with some over HTTP.  But, there is some overlap.</p>
  
  <p>So, I am wondering is there a way to 'bind' routes to both secureApp and App as I call them such that I don't have to write the route twice?</p>
  
  <p>ex. Right now I have two sets of the same route (one for HTTP and one for HTTPS):</p>
  
  <pre><code>app.get('/tweet-stats.json', function(req, res){
      res.set('Content-Type', 'application/json');
      res.send(publicTweetStatus());
  });
  
  secureApp.get('/tweet-stats.json', function(req, res){
      res.set('Content-Type', 'application/json');
      res.send(publicTweetStatus());
  });
  </code></pre>
  
  <p>I would like to do something like this:</p>
  
  <pre><code>model.get('/tweet-stats.json', function(req, res){
      res.set('Content-Type', 'application/json');
      res.send(publicTweetStatus());
  });
  
  app.handle.bind(model);
  secureApp.handle.bind(model);
  </code></pre>
  
  <p>Is this possible?  I would make for much better coding where I only manage ONE instance of this particular route across all ports.</p>