Created
July 23, 2014 16:37
-
-
Save adohe-zz/05083cd6b1c75afd2275 to your computer and use it in GitHub Desktop.
a typical connect middleware writing style
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
| /** | |
| * A typical connect middleware | |
| */ | |
| module.exports = function dist (/* options */) { | |
| // stuff | |
| return function (req, res, next) { | |
| // stuff | |
| next(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment