From 61727a771e8e47fc2e6748463bcddf28925df620 Mon Sep 17 00:00:00 2001 From: Alex Kocharin Date: Thu, 20 Jun 2013 22:40:04 +0400 Subject: [PATCH] bug: it's not really listening on localhost by default --- bin/sinopia | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/sinopia b/bin/sinopia index 14a007b11..46631cb09 100755 --- a/bin/sinopia +++ b/bin/sinopia @@ -34,6 +34,9 @@ var hostport = commander.listen.split(':'); if (hostport.length < 2) { hostport = [undefined, hostport[0]]; } +if (hostport[0] == null) { + hostport[0] = 'localhost'; +} server(config).listen(hostport[1], hostport[0]); -console.log('Server is listening on http://%s:%s/', hostport[0] || 'localhost', hostport[1]); +console.log('Server is listening on http://%s:%s/', hostport[0], hostport[1]);