function(app){

        // Cache the instance.
        var self = this;

        // Insert the instance into app.locals so it can be used in views.
        app.locals[self.options.templateVar] = self;

        // Grab the routes.
        var routes = self.getRoutes();

        // Bind them.
        routes.forEach(function(route){

            // If the controller begins with 'staticDir:', it's a static route.
            if (route.controller.indexOf('staticDir:') === 0) {
                self.bindStaticRoute(app, route);
            }

            else {
                self.bindRegularRoute(app, route);
            }
        });
    }
function(app){

        
        var self = this;

        
        app.locals[self.options.templateVar] = self;

        
        var routes = self.getRoutes();

        
        routes.forEach(function(route){

            
            if (route.controller.indexOf('staticDir:') === 0) {
                self.bindStaticRoute(app, route);
            }

            else {
                self.bindRegularRoute(app, route);
            }
        });
    }
function ( app ) { // Cache the instance. var self = this ; // Insert the instance into app.locals so it can be used in views. app . locals [ self . options . templateVar ] = self ; // Grab the routes. var routes = self . getRoutes ( ) ; // Bind them. routes . forEach ( function ( route ) { // If the controller begins with 'staticDir:', it's a static route. if ( route . controller . indexOf ( 'staticDir:' ) === 0 ) { self . bindStaticRoute ( app , route ) ; } else { self . bindRegularRoute ( app , route ) ; } } ) ; }
Binds the loaded routes against the passed app.
@param {object} app An Express app instance to bind routes against.
Binds the loaded routes against the passed app .