Skip to content
Myr

Exporting 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 15f3b2f · Browse files · 1 file+7 added−6 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+7 added−6 removed

  • other:+7 added−6 removed

1 file+7 added−6 removed

modified:lib/express.core.js+7 added-6 removed
68 unmodified lines
69 * @api public70 */71 72 use : function(name, callback) {73 this.hookCallbacks[name].push(callback)73 Express.hookCallbacks[name].push(callback)74 },75 76 /**77 * Start express, binding to _port_.
417 unmodified lines
495 },496 497 display : function(path) {498 499 },500 501 Logger : function(request, response){502 puts('"' + request.method + ' /' + request.uri.path + ' HTTP/' + request.httpVersion + '" - ' + Express.response.status)503 }504 }505 506 get = Express.routeFunctionFor('get')507 post = Express.routeFunctionFor('post')508 del = Express.routeFunctionFor('delete')509 put = Express.routeFunctionFor('put')510 use = Express.use511 512})()513509Logger = function(request, response){510 puts('"' + request.method + ' /' + request.uri.path + ' HTTP/' + request.httpVersion + '" - ' + Express.response.status)511}514use('response', Express.Logger)515513Express.use('response', Logger)514516get('user/:name/:operation', function(){517 p(request.headers['User-Agent'])518 p(request.headers['Accept'])519 p(request.headers['Accept-Encoding'])
31 unmodified lines