Add an axum sse example (#12)
* add axum sse example * fix: make the sse axum folder name correct * feat: add common modules for Axum SSE example This commit adds supporting modules for the Axum Server-Sent Events (SSE) example: - Added `counter.rs` with a simple counter router implementation - Added `jsonrpc_frame_codec.rs` for decoding JSON-RPC frames - Created a `mod.rs` to expose these modules - Removed the previous SSE example configuration from Cargo.toml * move examples to root * nit: remove extra newline here
This commit is contained in:
parent
6609aa6aa8
commit
c0bd94dd85
1 changed files with 381 additions and 187 deletions
|
|
@ -17,6 +17,15 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|||
tracing-appender = "0.2"
|
||||
futures = "0.3"
|
||||
|
||||
[dev-dependencies]
|
||||
axum = { version = "0.8", features = ["macros"] }
|
||||
tokio-util = { version = "0.7", features = ["io", "codec"]}
|
||||
rand = { version = "0.8" }
|
||||
|
||||
[[example]]
|
||||
name = "counter-server"
|
||||
path = "src/counter_server.rs"
|
||||
|
||||
[[example]]
|
||||
name = "axum"
|
||||
path = "src/axum.rs"
|
||||
Loading…
Reference in a new issue