Middleware like hooks for node.js