Skip to content
Myr

express(1) now outputting listening msg, and express.MIDDLEWARE vs connect.MIDDLWARE

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

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent ffd978c · Browse files · 1 file+11 added−9 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+11 added−9 removed

  • other:+11 added−9 removed

1 file+11 added−9 removed

modified:bin/express+11 added-9 removed
92 unmodified lines
93 '/**',94 ' * Module dependencies.',95 ' */',96 '',97 'var express = require(\'express\'),',98 ' connect = require(\'connect\');',97 'var express = require(\'express\');',98 '',99 'var app = module.exports = express.createServer();',100 '',101 '// Configuration',102 '',103 'app.configure(function(){',104 ' app.set(\'views\', __dirname + \'/views\');',106 ' app.use(connect.bodyDecoder());',107 ' app.use(connect.methodOverride());',108 ' app.use(connect.compiler({ src: __dirname + \'/public\', enable: [\'less\'] }));',105 ' app.use(express.bodyDecoder());',106 ' app.use(express.methodOverride());',107 ' app.use(express.compiler({ src: __dirname + \'/public\', enable: [\'less\'] }));',108 ' app.use(app.router);',110 ' app.use(connect.staticProvider(__dirname + \'/public\'));',109 ' app.use(express.staticProvider(__dirname + \'/public\'));',110 '});',111 '',112 'app.configure(\'development\', function(){',114 ' app.use(connect.errorHandler({ dumpExceptions: true, showStack: true })); ',113 ' app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); ',114 '});',115 '',116 'app.configure(\'production\', function(){',118 ' app.use(connect.errorHandler()); ',117 ' app.use(express.errorHandler()); ',118 '});',119 '',120 '// Routes',121 '',
6 unmodified lines
128 '});',129 '',130 '// Only listen on $ node app.js',131 '',133 'if (!module.parent) app.listen(3000);',132 'if (!module.parent) {',133 ' app.listen(3000);',134 ' console.log("Express server listening on port %d", app.address().port)',135 '}',136 ''137].join('\n');138139// Parse arguments
78 unmodified lines