Skip to content
Myr

express.js

This file

Path

lib/express.js

88 lines · 1.2 KiB · JavaScript

Last changed by

version -pre so people are less confusedTj Holowaychukbefore adoption6b1dc31

History of this file

Take it

The walk stopped after 200 commits: lines older than cd88b92 point at it.

Removed `app.dynamicLocals()`. Closes #756Tj Holowaychukbefore adoptioncd88b92

lines 1–12why, one step back
1
2/*!3 * Express4 * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>5 * MIT Licensed6 */78/**9 * Module dependencies.10 */1112var connect = require('connect')

application.jsTj Holowaychukbefore adoptiond0585bd

line 13why, one step back
13 , proto = require('./application')

setting up protoTj Holowaychukbefore adoptiond6b5047

lines 14–15why, one step back
14 , Route = require('./router/route')
15 , utils = connect.utils;

Removed `app.dynamicLocals()`. Closes #756Tj Holowaychukbefore adoptioncd88b92

line 16why, one step back
16

uncommented old codeTj Holowaychukbefore adoptionce03cf4

lines 17–19why, one step back
17/**
18 * Expose `createApplication()`.19 */

Removed `app.dynamicLocals()`. Closes #756Tj Holowaychukbefore adoptioncd88b92

line 20why, one step back
20

uncommented old codeTj Holowaychukbefore adoptionce03cf4

lines 21–26why, one step back
21exports = module.exports = createApplication;
2223/**24 * Framework version.25 */26

version -pre so people are less confusedTj Holowaychukbefore adoption6b1dc31

line 27why, one step back
27exports.version = '3.0.0alpha1-pre';

uncommented old codeTj Holowaychukbefore adoptionce03cf4

lines 28–36why, one step back
28
29/**30 * Create an express application.31 *32 * @return {Function}33 * @api public34 */3536function createApplication() {

setting up protoTj Holowaychukbefore adoptiond6b5047

lines 37–38why, one step back
37 var app = connect();
38 utils.merge(app, proto);

using connect.proto.useTj Holowaychukbefore adoption667ed6f

line 39why, one step back
39 app.init();

setting up protoTj Holowaychukbefore adoptiond6b5047

lines 40–41why, one step back
40 return app;
41}

Removed `app.dynamicLocals()`. Closes #756Tj Holowaychukbefore adoptioncd88b92

line 42why, one step back
42

expose connect middleware as express.* againTj Holowaychukbefore adoption65c0d14

lines 43–48why, one step back
43/**
44 * Expose connect.middleware as express.*45 * for example `express.logger` etc. 46 */4748for (var key in connect.middleware) {

misc refactoringTj Holowaychukbefore adoption60353c6

lines 49–52why, one step back
49 Object.defineProperty(
50 exports51 , key52 , Object.getOwnPropertyDescriptor(connect.middleware, key));

expose connect middleware as express.* againTj Holowaychukbefore adoption65c0d14

lines 53–54why, one step back
53}
54

uncommented old codeTj Holowaychukbefore adoptionce03cf4

line 55why, one step back
55/**

expose prototypeTj Holowaychukbefore adoption7b5ed50

lines 56–61why, one step back
56 * Expose prototype.
57 */5859exports.application = proto;6061/**

uncommented old codeTj Holowaychukbefore adoptionce03cf4

lines 62–87why, one step back
62 * Expose constructors.
63 */6465exports.Route = Route;6667/**68 * Expose HTTP methods.69 */7071exports.methods = require('./router/methods');7273/**74 * Response extensions.75 */7677require('./response');7879/**80 * Request extensions.81 */8283require('./request');8485// Error handler title8687exports.errorHandler.title = 'Express';

Removed `app.dynamicLocals()`. Closes #756Tj Holowaychukbefore adoptioncd88b92

line 88why, one step back
88