I think what you're looking for is something like this:
var http = require('http');
http.ServerResponse.prototype.send = function(data) {
// ...
};
var responseHandler = function(req, res){
res.send('hello world');
}
http.createServer(responseHandler).listen(3000);