Skip to content
Myr

Added host

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

authored by visionmedia · committed by visionmedia · parent 267b4aa · Browse files · 1 file+8 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+8 added−6 removed

  • other:+8 added−6 removed

1 file+8 added−6 removed

modified:lib/express.core.js+8 added-6 removed
78 unmodified lines
79 Express.hookCallbacks[name].push(callback)80 },81 82 /**83 * Start express, binding to _port_.83 * Start express, binding to _host_ / _port_.84 *85 * @param {int} port86 * @param {string} host87 * @api public88 */89 89 start : function(port) {90 start : function(port, host) {91 this.server.listen(port || 3000, function(request, response){92 Express.response.body = null93 Express.response.status = 20094 Express.request = request
13 unmodified lines
108 109 server : {110 111 /**111 * Listen to _port_ with _callback_.112 * Listen to _host_ / _port_ with _callback_.113 *114 * @param {int} port115 * @param {string} host116 * @param {function} callback117 * @api private118 */119 118 listen : function(port, callback) {119 node.http.createServer(callback).listen(port)120 puts('Express listening to http://localhost:' + port)120 listen : function(port, host, callback) {121 node.http.createServer(callback).listen(port, host)122 puts('Express started at http://' + (host || '127.0.0.1') + ':' + port + '/')123 }124 },125 126 /**
479 unmodified lines