title: NodeJS Express - separate routes on two ports
body: <p>I have an express server, and while building it created several "helper" functions on their own routes. I'd like those routes to be accessed on a different port.  Is there anyway to do this in express?</p>
  
  <p>In the code below, the "/factory" route (and other functionality) would be on one port, and the helper routes of "/killallthings", "/listallthings", and "/killserver" would be on a separate port.  </p>
  
  <p>Here is a simplified version of the code:</p>
  
  <pre><code>var express = require('express');
  var things = [];
  var app = express();
  var port = 8080; 
  
  app.post('/factory/', function(req, res) {
    //Create a thing and add it to the thing array
  });
  
  //Assume more functions to do to things here....
  
  app.post('/killallthings/', function(req, res) {
    //Destroy all the things in the array
  });
  
  app.post('/listallthings/', function(req, res) {
    // Return a list of all the things
  });
  
  app.post('/killserver/', function(req,res){
    //Kills the server after killing the things and doing clean up
  });
  
  //Assume https options properly setup.
  
  var server = require('https').createServer(options, app);
  
  server.listen(port, function() {
      logger.writeLog('Listening on port ' + port);
  });
  </code></pre>
  
  <p>Is this possible with express?</p>