title: How do I get the http.server from the express app?
body: <p>I am writing a server-side node.js application that uses express to handle HTTP requests and I'm adding websockets (socket.io) support. However I don't have access to the code that starts the HTTP server. I am writing an express router and functions to handle various URLs. My code looks like:</p>
  
  <pre><code>var express = require('express');
  var router = express.Router();
  router.post( myURL, myFunction );
  </code></pre>
  
  <p>When setting up the router I want to use socket.io to listen for websocket connections as well. I cannot pass <code>express</code> or <code>express()</code> into <code>require('socket.io')( xxx )</code>, I need to pass the http.Server object. But since I didn't start the server, how can I get it?</p>