jarradseers/express-load — pull request #2 by fabien (2012-09-15 16:01:28+00:00)
Title: More flexible module loading

This tiny fix adds the ability to pass any number of context variables to a module during loading.

For example, let's say I'd like to add a path prefix in Express:

```javascript

module.exports = function(app, namespace) {

var controller = this;

exports.index = function(req, res) {
res.locals.controller_name = controller.name;
res.render('index');
};

app.namespace(namespace + '/' + controller.name, function() {
app.get('/', exports.index);
app.get('/other', exports.other);
});

}
```