Skip to content

Commit 229303d

Browse files
authored
docs: update --host documentation (#3155)
1 parent 2d51e02 commit 229303d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

examples/cli/host-and-port/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,30 @@ _This also works with IPv6_
1717
npm run webpack-dev-server -- --open --port 5000 --host ::
1818
```
1919

20+
## local-ip
21+
22+
Specifying `local-ip` as `host` will try to resolve the `host` option as your local `IPv4` address if available, if `IPv4` is not available it will try to resolve your local `IPv6` address.
23+
24+
```console
25+
npm run webpack-dev-server -- --open --port 5000 --host local-ip
26+
```
27+
28+
## local-ipv4
29+
30+
Specifying `local-ipv4` as `host` will try to resolve the `host` option as your local `IPv4` address.
31+
32+
```console
33+
npm run webpack-dev-server -- --open --port 5000 --host local-ipv4
34+
```
35+
36+
## local-ipv6
37+
38+
Specifying `local-ipv6` as `host` will try to resolve the `host` option as your local `IPv6` address.
39+
40+
```console
41+
npm run webpack-dev-server -- --open --port 5000 --host local-ipv6
42+
```
43+
2044
## What Should Happen
2145

2246
1. The script should open `http://0.0.0.0:5000/` if specifying the IPv4 option,

0 commit comments

Comments
 (0)