Skip to content
Myr

run() returns the http.Server instance. Closes #298

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

authored by visionmedia · committed by visionmedia · parent 0d02ea4 · Browse files · 2 files+5 added−3 removed
This commit

State

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

Diff stats

2 files+5 added−3 removed

  • other:+5 added−3 removed

2 files+5 added−3 removed

modified:lib/express/core.js+4 added-2 removed
195 unmodified lines
196 * and host defaulting to null (INADDR_ANY).197 *198 * @param {int} port199 * @param {string} host200 * @return {Server}201 * @see run()202 * @api private203 */204 205 run: function(port, host){206 var self = this207 if (host !== undefined) this.host = host208 if (port !== undefined) this.port = port208 http209 var server = http210 .createServer(function(req, response){211 var request, pendingFiles = 0212 req.setBodyEncoding('binary')213 request = new Request(req, response)
46 unmodified lines
260 req261 .addListener('data', function(chunk){ request.body += chunk })262 .addListener('end', callback)263 })263 .listen(this.port, this.host, this.backlog)264 server.listen(this.port, this.host)265 sys.puts('Express started at http://' + (this.host || '*') + ':' + this.port + '/ in ' + Express.environment + ' mode')266 return server267 },268 269 /**270 * Route the given _request_.
57 unmodified lines
modified:lib/express/dsl.js+1 added-1 removed