function(app, route){

        var self = this;

        // Figure out the folder they want to bind.
        var folderPath = route.controller.replace(/staticDir:/g, '');
        var folder = self.options.rootPath + folderPath;

        // Make sure that's actually a folder.
        try {
            var info = fs.lstatSync(folder);
            if (info.isDirectory()) {
                app.use(express.static(folder));
            }
        }
        catch (e) {
            throw new Error('The specified static path (' + folderPath + ') does not exist or is not a directory.');
        }
    }
function(app, route){

        var self = this;

        
        var folderPath = route.controller.replace(/staticDir:/g, '');
        var folder = self.options.rootPath + folderPath;

        
        try {
            var info = fs.lstatSync(folder);
            if (info.isDirectory()) {
                app.use(express.static(folder));
            }
        }
        catch (e) {
            throw new Error('The specified static path (' + folderPath + ') does not exist or is not a directory.');
        }
    }
function ( app , route ) { var self = this ; // Figure out the folder they want to bind. var folderPath = route . controller . replace ( / staticDir: / g , '' ) ; var folder = self . options . rootPath + folderPath ; // Make sure that's actually a folder. try { var info = fs . lstatSync ( folder ) ; if ( info . isDirectory ( ) ) { app . use ( express . static ( folder ) ) ; } } catch ( e ) { throw new Error ( 'The specified static path (' + folderPath + ') does not exist or is not a directory.' ) ; } }
Handles binding a particular folder to be served statically by Express.
@param {Object} app The application to bind against.
@param {Object} route The details of the route to bind.
Handles binding a particular folder to be served statically by Express .