Skip to content

Instantly share code, notes, and snippets.

@bcoe
Created September 12, 2011 20:02
Show Gist options
  • Save bcoe/1212233 to your computer and use it in GitHub Desktop.
Save bcoe/1212233 to your computer and use it in GitHub Desktop.
example-express.js
res.sendfile = function(path, options, fn){
var self = this
, req = self.req
, next = this.req.next
, options = options || {};
// support function as second arg
if ('function' == typeof options) {
fn = options;
options = {};
}
// ... Function body.
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment