File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # internalIP (family: "v4" | "v6")
1+ # findIp (family: "v4" | "v6")
22
3- Returns the internal IP address asynchronously .
3+ Returns the internal IP address.
44
55``` js
66const WebpackDevServer = require (" webpack-dev-server" );
77
88const logInternalIPs = async () => {
9- const localIPv4 = await WebpackDevServer .internalIP (" v4" );
10- const localIPv6 = await WebpackDevServer .internalIP (" v6" );
9+ const localIPv4 = WebpackDevServer .findIp (" v4" , false );
10+ const localIPv6 = WebpackDevServer .findIp (" v6" , false );
1111
1212 console .log (" Local IPv4 address:" , localIPv4);
1313 console .log (" Local IPv6 address:" , localIPv6);
Original file line number Diff line number Diff line change 33const WebpackDevServer = require ( "../../../lib/Server" ) ;
44
55const logInternalIPs = async ( ) => {
6- const localIPv4 = await WebpackDevServer . internalIP ( "v4" ) ;
7- const localIPv6 = await WebpackDevServer . internalIP ( "v6" ) ;
6+ const localIPv4 = WebpackDevServer . findIp ( "v4" , false ) ;
7+ const localIPv6 = WebpackDevServer . findIp ( "v6" , false ) ;
88
99 console . log ( "Local IPv4 address:" , localIPv4 ) ;
1010 console . log ( "Local IPv6 address:" , localIPv6 ) ;
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments