|
|
@ -164,16 +164,17 @@ class LocalWebServer { |
|
|
|
|
|
|
|
const tableLayout = require('table-layout') |
|
|
|
|
|
|
|
server |
|
|
|
.listen(options.port) |
|
|
|
.on('listening', function () { |
|
|
|
if (options.testMode) return |
|
|
|
server.listen(options.port) |
|
|
|
if (onListening) server.on('listening', onListening) |
|
|
|
if (!options.testMode) { |
|
|
|
server.on('listening', function () { |
|
|
|
const ipList = getIPList() |
|
|
|
.map(iface => `[underline]{${server.isHttps ? 'https' : 'http'}://${iface.address}:${options.port}}`) |
|
|
|
.join(', ') |
|
|
|
console.error(ansi.format('Serving at', 'bold'), ansi.format(ipList)) |
|
|
|
}) |
|
|
|
.on('listening', onListening) |
|
|
|
} |
|
|
|
|
|
|
|
return server |
|
|
|
} |
|
|
|
|
|
|
|