0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

bug: it's not really listening on localhost by default

This commit is contained in:
Alex Kocharin 2013-06-20 22:40:04 +04:00
parent 693f222dc2
commit 61727a771e

View file

@ -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]);