Skip to content

Instantly share code, notes, and snippets.

@indexzero
Created November 9, 2010 19:45
Show Gist options
  • Save indexzero/669679 to your computer and use it in GitHub Desktop.
Save indexzero/669679 to your computer and use it in GitHub Desktop.
var journey = require('journey');
function quthorize (req, body, cb) {
// Put auth handler in here
};
var router = new (journey.Router)(function (map) {
map.path('/data', function () {
map.filter(function () {
// authorized stuff here
});
});
map.get('foo').filter().bind(function () {
// authorized stuff here
});
}, { filter: authorize });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment