Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bin/http-server
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,10 @@ function listen(port) {
if (argv.a && host !== '0.0.0.0') {
logger.info(` ${protocol}${host}:${chalk.green(port.toString())}`);
} else {
var ipv4Family = parseInt(process.versions.node.split('.')[0], 10) >= 18 ? 4 : 'IPv4';
Object.keys(ifaces).forEach(function (dev) {
ifaces[dev].forEach(function (details) {
if (details.family === 'IPv4') {
if (details.family === ipv4Family) {
logger.info((' ' + protocol + details.address + ':' + chalk.green(port.toString())));
}
});
Expand Down