diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/app.js | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -76,11 +76,11 @@ App.prototype.go = function () { var server = http.createServer(function (req, res) { new Serve(self, req, res).go() }) - if (self.host === 'localhost') server.listen(self.port, onListening) - else server.listen(self.port, self.host, onListening) + server.listen(self.port, self.host, onListening) function onListening() { - var host = /:/.test(self.host) ? '[' + self.host + ']' : self.host - self.log('Listening on http://' + host + ':' + self.port) + var addr = server.address() + var host = addr.family === 'IPv6' ? '[' + addr.address + ']' : addr.address + self.log('Listening on http://' + host + ':' + addr.port) } // invalidate cached About info when new About messages come in |