From 3c9f0621cd6d605de9beeacfc4703539f1590ab4 Mon Sep 17 00:00:00 2001 From: cel Date: Tue, 18 Apr 2017 21:11:40 -0700 Subject: Print http address in copy-pastable format --- lib/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3