title: Express.js - app.listen vs server.listen
body: <p>This may be a very basic question but I simply don't get it. What is the difference between creating an app using <em>Express.js</em> and starting the app listening on port 1234, for example:</p>
  
  <pre><code>var express = require('express');
  var app = express();
  
  //app.configure, app.use etc
  
  app.listen(1234);
  </code></pre>
  
  <p>and adding an http server:</p>
  
  <pre><code>var express = require('express');
  var http = require('http');
  
  var app = express();
  var server = http.createServer(app);
  
  //app.configure, app.use etc
  
  server.listen(1234);
  </code></pre>
  
  <p>What's the difference?<br>
  If I navigate to <code>http://localhost:1234</code>, thus I get the same output.</p>