Created
June 14, 2016 19:40
-
-
Save petersirka/e81a923350ccd57c1ed3def504a37a2a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.install = function() { | |
F.route('/', view_a, ['#A']); | |
F.route('/*', view_b, ['#B']); | |
} | |
F.middleware('A', function(req, res, next, options, controller) { | |
console.log('A'); | |
next(); | |
}); | |
F.middleware('B', function(req, res, next, options, controller) { | |
console.log('B'); | |
next(); | |
}); | |
function view_a() { | |
this.plain('A'); | |
} | |
function view_b() { | |
this.plain('B'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment