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:
4t145 2025-03-04 12:01:21 +08:00 • committed by GitHub
commit c0bd94dd85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"