bugfix print ipv6 when exists

This commit is contained in:
AJ ONeal 2016-10-06 22:40:16 -06:00
parent a33084d816
commit ba0c30b685
1 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,8 @@
#!/usr/bin/env node
'use strict';
var PromiseA = global.Promise; // require('bluebird');
//var PromiseA = global.Promise;
var PromiseA = require('bluebird');
var https = require('httpolyglot');
var http = require('http');
var fs = require('fs');
@ -309,11 +310,11 @@ function run() {
}
console.info('\t' + httpsUrl);
if (iface.ipv6.length) {
httpsUrl = 'https://[' + iface.ipv6[0].address + ']';
if (httpsPort !== opts.port) {
httpsUrl += ':' + opts.port;
}
if (iface.ipv6.length) {
console.info('\t' + httpsUrl);
}
}