Skip to content

docs: update client.webSocketURL examples #3432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions examples/cli/web-socket-url-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# CLI: Web Socket URL

```console
npx webpack serve --open-target --host 0.0.0.0 --web-socket-url <insert-host>:8080
npx webpack serve --open-target --host 0.0.0.0 --client-web-socket-url ws://<insert-host>:8080
```

_NOTE: replace `<insert local ip>` with your local IP Address._
_NOTE: replace `<insert-host>` with your local IP Address._

In order to make the server publicly accessible the client needs to know with
what host to connect to the server. If `--host 0.0.0.0` is given, the client
would try to connect to `0.0.0.0`. With the `--web-socket-url` options it is possible to
would try to connect to `0.0.0.0`. With the `--client-web-socket-url` options it is possible to
override this.

## What Should Happen
Expand Down
4 changes: 1 addition & 3 deletions examples/cli/web-socket-url/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
npx webpack serve
```

_NOTE: replace `<insert local ip>` with your local IP Address._

You're now able to explicitly define the protocol used with the `client.webSocketURL` option
(have a look to the config provided in `webpack.config.js`).
(have a look at the config provided in `webpack.config.js`).

## What Should Happen

Expand Down