// When setting up your application define what you need using // http://expressjs.com/api.html#app.use // In this case we are creating an instance of 'Bar' app.use(function( req, res, next ) { res.locals.foo = new Bar(); next(); }); // Later on in your routes you have access to the instance of 'Bar' // This saves on having to include the Bar 'class' in each route file etc app.get( '/', function( req, res ) { // res.locals.foo is our instance of 'Bar' res.send('hello world'); });