Switch to axum and session-rs 0.2 with a health endpoint
- Serve the session WebSocket on `/` through axum (`Session::from_axum`) with a 1 MiB message limit - Add `/health` (checks the database) and a `server healthcheck` subcommand used by the Dockerfile HEALTHCHECK - Shut down on SIGTERM/Ctrl+C so container stops are immediate - Move per-connection handler registration into `register_handlers` Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+3
-2
@@ -4,13 +4,14 @@ version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
axum = { version = "0.8.9", features = ["ws"] }
|
||||
reqwest = { version = "0.13.2", features = ["json"] }
|
||||
serde = { version = "1.0.228", features = ["serde_derive"] }
|
||||
serde_json = "1.0.149"
|
||||
session-rs = "0.1.3"
|
||||
session-rs = { version = "0.2.0", default-features = false, features = ["axum"] }
|
||||
sqlx = { version = "0.8.6", features = [
|
||||
"sqlite",
|
||||
"runtime-tokio-native-tls",
|
||||
"macros",
|
||||
] }
|
||||
tokio = "1.49.0"
|
||||
tokio = { version = "1.49.0", features = ["macros", "rt-multi-thread", "net", "signal", "sync", "time"] }
|
||||
|
||||
Reference in New Issue
Block a user