mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-06 09:31:28 +00:00
26 lines
557 B
Markdown
26 lines
557 B
Markdown
|
# WebSockets Example
|
||
|
|
||
|
[View documentation for this example online][dox] or [View compiled example
|
||
|
online][compiled]
|
||
|
|
||
|
[compiled]: https://rustwasm.github.io/wasm-bindgen/exbuild/websockets/
|
||
|
[dox]: https://rustwasm.github.io/wasm-bindgen/examples/websockets.html
|
||
|
|
||
|
You can build the example locally with:
|
||
|
|
||
|
```
|
||
|
$ wasm-pack build --target web
|
||
|
```
|
||
|
|
||
|
Then serve the statics and navigate to `host:port`
|
||
|
|
||
|
```
|
||
|
# static server from https://crates.io/crates/https
|
||
|
http
|
||
|
|
||
|
# or use python
|
||
|
python -m SimpleHTTPServer
|
||
|
```
|
||
|
|
||
|
Make sure that you have `WebSockets` server running
|