0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-17 23:45:29 -05:00

numeric port in config file

This commit is contained in:
Alex Kocharin 2013-09-25 12:10:40 +04:00
parent 6c78876dcd
commit 9374872a64

View file

@ -33,7 +33,9 @@ if (commander.config) {
if (!config.user_agent) config.user_agent = 'Sinopia/'+pkg.version;
if (!config.self_path) config.self_path = config_path;
var hostport = commander.listen || config.listen || '4873';
// command line || config file || default
var hostport = commander.listen || String(config.listen || '') || '4873';
hostport = hostport.split(':');
if (hostport.length < 2) {
hostport = [undefined, hostport[0]];