You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library prints ip addresses to stdout if they are ipv4 after listening. it does this by calling os.networkInterfaces(), which now returns 4 or 6 (unlike before in v17 - family <string> Either IPv4 or IPv6).
Environment Versions
OS Type - any
Node version: $ node --version: v18.0.0
http-server version: $ http-server --version present in latest master -
Starting up http-server, serving ./
Available on:
http://127.0.0.1:8082
Hit CTRL-C to stop the server
Actual result
server prints:
Starting up http-server, serving ./
Available on:
Hit CTRL-C to stop the server
Other information
I think the library should take into the current value of process.version when printing listening interfaces. Better yet would be to not check this at all. why not show the user (properly formatted) ipv6 links? I will submit a fix that replicates the old business logic, the new business logic could be considered in a different ticket.
The text was updated successfully, but these errors were encountered:
alexanderankin
changed the title
Print interfaces in server listening message correctly on node 18
Printing interfaces filters incorrectly on node 18 (in server listening message)
May 9, 2022
This library prints ip addresses to stdout if they are ipv4 after listening. it does this by calling
os.networkInterfaces()
, which now returns4
or6
(unlike before in v17 -family <string> Either IPv4 or IPv6
).Environment Versions
$ node --version
:v18.0.0
$ http-server --version
present in latest master -http-server/bin/http-server
Line 229 in 318c55f
Steps to reproduce
Expected result
server prints:
Actual result
server prints:
Other information
I think the library should take into the current value of
process.version
when printing listening interfaces. Better yet would be to not check this at all. why not show the user (properly formatted) ipv6 links? I will submit a fix that replicates the old business logic, the new business logic could be considered in a different ticket.The text was updated successfully, but these errors were encountered: