Created
May 29, 2017 07:50
-
-
Save woowa/ab6de3e704e59b59478c5fa427eea264 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
function SampleMiddleware(options) { | |
this.mwtype = 'router'; | |
this.features = ['params', 'query']; | |
this.before = function(feature) { | |
console.log(feature.params); | |
console.log(feature.query); | |
console.log(options.testVal); | |
} | |
} | |
app.set(SampleMiddleware, { testVal: 'val' }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment