express.js
This file
Path
lib/express.js
65 lines · 1.1 KiB · JavaScript
Last changed by
remove last pieces of connect dependencyRoman Shtylmanbefore adoption1396e08
History of this fileTake it
The walk stopped after 200 commits: lines older than 916acd1 point at it.
replace 0.6.x travis with 0.10.xTJ Holowaychukbefore adoption916acd1
lines 1–4why, one step back1/**2 * Module dependencies.3 */4remove app.router and refactor middleware processingRoman Shtylmanbefore adoptionf41d09a
lines 5–6why, one step back5var EventEmitter = require('events').EventEmitter;6remove last pieces of connect dependencyRoman Shtylmanbefore adoption1396e08
line 7why, one step back7var merge = require('merge-descriptors')use utils-merge module to mixin object propertiesRoman Shtylmanbefore adoption718e68f
lines 8–10why, one step back8 , mixin = require('utils-merge')910var proto = require('./application')replace 0.6.x travis with 0.10.xTJ Holowaychukbefore adoption916acd1
lines 11–15why, one step back11 , Route = require('./router/route')12 , Router = require('./router')13 , req = require('./request')14 , res = require('./response')15remove last pieces of connect dependencyRoman Shtylmanbefore adoption1396e08
lines 16–18why, one step back16// monkey patch ServerResponse methods17require('./patch')18replace 0.6.x travis with 0.10.xTJ Holowaychukbefore adoption916acd1
lines 19–32why, one step back19/**20 * Expose `createApplication()`.21 */2223exports = module.exports = createApplication;2425/**26 * Create an express application.27 *28 * @return {Function}29 * @api public30 */3132function createApplication() {remove app.router and refactor middleware processingRoman Shtylmanbefore adoptionf41d09a
lines 33–36why, one step back33 var app = function(req, res, next) {34 app.handle(req, res, next);35 };36use utils-merge module to mixin object propertiesRoman Shtylmanbefore adoption718e68f
line 37why, one step back37 mixin(app, proto);remove app.router and refactor middleware processingRoman Shtylmanbefore adoptionf41d09a
lines 38–39why, one step back38 mixin(app, EventEmitter.prototype);39Merge pull request #1650 from printercu/masterTJ Holowaychukbefore adoptionaec3428
lines 40–41why, one step back40 app.request = { __proto__: req, app: app };41 app.response = { __proto__: res, app: app };replace 0.6.x travis with 0.10.xTJ Holowaychukbefore adoption916acd1
lines 42–60why, one step back42 app.init();43 return app;44}4546/**47 * Expose the prototypes.48 */4950exports.application = proto;51exports.request = req;52exports.response = res;5354/**55 * Expose constructors.56 */5758exports.Route = Route;59exports.Router = Router;60remove last pieces of connect dependencyRoman Shtylmanbefore adoption1396e08
lines 61–63why, one step back61/**62 * Expose middleware63 */replace 0.6.x travis with 0.10.xTJ Holowaychukbefore adoption916acd1
line 64why, one step back64remove last pieces of connect dependencyRoman Shtylmanbefore adoption1396e08
line 65why, one step back65exports.static = require('./middleware/static');