Skip to content

Commit

Permalink
fix(index): Changed order of app configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
pilsy committed Jun 4, 2014
1 parent 4811222 commit 80f9a98
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ var cors = require( 'cors' );
// Bootstrap the environment
var env = utils.bootstrapEnv();

// Load all the modules
env.moduleLoader.loadModules();

// Configure the app before routes
// Configure the app before loading modules
env.app.configure(function() {
env.app.use( env.express.urlencoded() );
env.app.use( env.express.json() );
Expand All @@ -17,6 +14,9 @@ env.app.configure(function() {
env.app.use( env.express.methodOverride() );
});

// Load all the modules
env.moduleLoader.loadModules();

// Initialize all the modules
env.moduleLoader.initializeRoutes( injector );

Expand Down Expand Up @@ -45,4 +45,4 @@ env.app.listen( env.webPort, function() {
});

// Export the Express app
module.exports = env.app;
module.exports = env.app;

0 comments on commit 80f9a98

Please sign in to comment.