Skip to content
Myr

include -> use

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 26d9305 · Browse files · 1 file+18 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+18 added−1 removed

  • other:+18 added−1 removed

1 file+18 added−1 removed

modified:lib/express.core.js+18 added-1 removed
60 unmodified lines
61 this.hookCallbacks[name][i].apply(this, this.argsArray(arguments, 1))62 },63 64 /**65 * Add middlware _callback_ for hook _name_.66 *67 * @param {string} name68 * @param {function} callback69 * @api public70 */71 72 use : function(name, callback) {73 this.hookCallbacks[name].push(callback)74 },75 76 /**77 * Start express, binding to _port_.78 *79 * @param {int} port80 * @api public
31 unmodified lines
112 }113 },114 115 prepareCookie : function() {104 p (this.response)116 var cookie = []117 for (var key in this.response.cookie)118 if (this.response.cookie.hasOwnProperty(key))119 cookie.push(key + '=' + this.response.cookie[key])
385 unmodified lines
505 put = Express.routeFunctionFor('put')506 507})()508509Logger = function(request, response){510 puts('"' + request.method + ' /' + request.uri.path + ' HTTP/1.1" - ' + Express.response.status)511}512513Express.use('response', Logger)514515get('user/:name/:operation', function(){516 p(request.headers['User-Agent'])517 p(request.headers['Accept'])518 p(request.headers['Accept-Encoding'])
31 unmodified lines