more
This commit is contained in:
parent
795f2a7edc
commit
6ab2ea7527
|
@ -381,30 +381,30 @@ function run() {
|
||||||
opts.redirectApp = require('redirect-https')(opts.redirectOptions);
|
opts.redirectApp = require('redirect-https')(opts.redirectOptions);
|
||||||
|
|
||||||
return createServer(port, pubdir, content, opts).then(function (servers) {
|
return createServer(port, pubdir, content, opts).then(function (servers) {
|
||||||
var msg;
|
|
||||||
var p;
|
var p;
|
||||||
var httpsUrl;
|
var httpsUrl;
|
||||||
|
var httpUrl;
|
||||||
var promise;
|
var promise;
|
||||||
|
|
||||||
|
console.info('');
|
||||||
|
console.info('Serving ' + pubdir + ' at ');
|
||||||
|
console.info('');
|
||||||
|
|
||||||
// Port
|
// Port
|
||||||
msg = 'Serving ' + pubdir + ' at ';
|
|
||||||
httpsUrl = 'https://' + opts.servername;
|
httpsUrl = 'https://' + opts.servername;
|
||||||
p = opts.port;
|
p = opts.port;
|
||||||
if (httpsPort !== p) {
|
if (httpsPort !== p) {
|
||||||
httpsUrl += ':' + p;
|
httpsUrl += ':' + p;
|
||||||
}
|
}
|
||||||
console.info('');
|
|
||||||
console.info(msg);
|
|
||||||
console.info('');
|
|
||||||
console.info('\t' + httpsUrl);
|
console.info('\t' + httpsUrl);
|
||||||
|
|
||||||
// Insecure Port
|
// Insecure Port
|
||||||
|
httpUrl = 'http://' + opts.servername;
|
||||||
p = opts.insecurePort;
|
p = opts.insecurePort;
|
||||||
if (httpPort !== p) {
|
if (httpPort !== p) {
|
||||||
p = ':' + opts.insecurePort;
|
httpUrl += ':' + p;
|
||||||
}
|
}
|
||||||
msg = '\thttp://' + opts.servername + p + ' (redirecting to https)';
|
console.info('\t' + httpUrl + ' (redirecting to https)');
|
||||||
console.info(msg);
|
|
||||||
console.info('');
|
console.info('');
|
||||||
|
|
||||||
if (!(argv.servername && defaultServername !== argv.servername && !(argv.key && argv.cert))) {
|
if (!(argv.servername && defaultServername !== argv.servername && !(argv.key && argv.cert))) {
|
||||||
|
|
Loading…
Reference in New Issue