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:
parent
6c78876dcd
commit
9374872a64
1 changed files with 3 additions and 1 deletions
|
@ -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]];
|
||||
|
|
Loading…
Add table
Reference in a new issue