try http.ServerRequest.prototype.myfunc = function() { ... };