aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-04-18 21:11:40 -0700
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-04-18 21:11:40 -0700
commit3c9f0621cd6d605de9beeacfc4703539f1590ab4 (patch)
tree2c347140081aa55bb411e14217cd50db13f2eb51
parent1894fca3bc64b329bfb559b17f5826daf0e14666 (diff)
downloadpatchfoo-3c9f0621cd6d605de9beeacfc4703539f1590ab4.tar.gz
patchfoo-3c9f0621cd6d605de9beeacfc4703539f1590ab4.zip
Print http address in copy-pastable format
-rw-r--r--lib/app.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/app.js b/lib/app.js
index 5630f41..da15d28 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -54,7 +54,8 @@ App.prototype.go = function () {
http.createServer(function (req, res) {
new Serve(self, req, res).go()
}).listen(self.port, self.host, function () {
- self.log('Listening on http://' + self.host + ':' + self.port)
+ var host = /:/.test(self.host) ? '[' + self.host + ']' : self.host
+ self.log('Listening on http://' + host + ':' + self.port)
})
// invalidate cached About info when new About messages come in