mirror of
https://github.com/actix/examples
synced 2025-06-28 09:50:36 +02:00
Fix "websocket" example's readme, and make binary names unique (#45)
Give each example binary a unique name. This should allow running cargo run --bin in the root directory.
This commit is contained in:
@ -5,11 +5,11 @@ authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||
workspace = "../"
|
||||
|
||||
[[bin]]
|
||||
name = "server"
|
||||
name = "websocket-server"
|
||||
path = "src/main.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "client"
|
||||
name = "websocket-client"
|
||||
path = "src/client.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -8,7 +8,7 @@ Simple echo websocket server.
|
||||
|
||||
```bash
|
||||
cd examples/websocket
|
||||
cargo run
|
||||
cargo run --bin websocket-server
|
||||
# Started http server: 127.0.0.1:8080
|
||||
```
|
||||
|
||||
@ -16,6 +16,13 @@ cargo run
|
||||
|
||||
- [http://localhost:8080/ws/index.html](http://localhost:8080/ws/index.html)
|
||||
|
||||
### rust client
|
||||
|
||||
```bash
|
||||
cd examples/websocket
|
||||
cargo run --bin websocket-client
|
||||
```
|
||||
|
||||
### python client
|
||||
|
||||
- ``pip install aiohttp``
|
||||
|
Reference in New Issue
Block a user