Skip to content

Commit

Permalink
expose httpServer not through express variables and move up serverIni…
Browse files Browse the repository at this point in the history
…t event
  • Loading branch information
kethinov committed May 24, 2015
1 parent e8e3123 commit 7d3bfa8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions roosevelt.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ module.exports = function(params) {
// expose initial vars
app.set('express', express);
app.set('params', params);

app.httpServer = httpServer;

// source user supplied params
app = require('./lib/sourceParams')(app);

Expand All @@ -37,14 +38,14 @@ module.exports = function(params) {
// configure express
app = require('./lib/setExpressConfigs')(app);

// map routes
app = require('./lib/mapRoutes')(app);

// fire user-defined onServerInit event
if (params.onServerInit && typeof params.onServerInit === 'function') {
params.onServerInit(app);
}

// map routes
app = require('./lib/mapRoutes')(app);

// determine number of CPUs to use
var numCPUs = 1;
process.argv.some(function(val, index, array) {
Expand Down

0 comments on commit 7d3bfa8

Please sign in to comment.