title: Export express app with asynchron middleware registration
body: <p>According to my previous ask question (<a href="https://stackoverflow.com/questions/27719918/how-to-register-async-middleware-module-within-express-js-app">How to register async middleware module within express.js app?</a>), I'd like to export my app with all middlewares, so that I can start a server with a start script like that:</p>
  
  <pre><code>var debug = require('debug')('MyApp');
  var app = require('../app');
  
  app.set('port', process.env.PORT || 3000);
  
  var server = app.listen(app.get('port'), function() {
     debug('Express server listening on port ' + server.address().port);
  });
  </code></pre>
  
  <p>How do I export in my app.js? Would you prefer a different module architecture?</p>