PersonalWebApplication/Server/Cargo.toml
cc 58bed0ae44 feat(server): 登录与开发者入口门改走 MySQL
UserStore/DevGate 不再写死,改为从 MySQL 实时查询(每次校验一条索引查询、
不缓存整表,照顾内存):
- 新增 db_pool_from_env(),UserStore 与 DevGate 共用一个 sqlx 懒连接池
- verify() 查 ccuser 表、allows() 查 dev_gate 表,均改为 async
- 未设置 DATABASE_URL 时各自回退到内置/文件兜底,便于本地无库开发

连接串经环境变量 DATABASE_URL 注入(线上写在 weather.env)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 20:43:23 +08:00

22 lines
619 B
TOML

[package]
name = "server"
version = "0.1.0"
edition = "2024"
[[bin]]
name = "RustServer"
path = "src/main.rs"
[dependencies]
axum = "0.8.9"
chrono = "0.4"
jsonwebtoken = "9"
reqwest = { version = "0.12", default-features = false, features = ["json", "gzip", "rustls-tls"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.150"
sha2 = "0.10.9"
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "tls-rustls", "mysql", "macros"] }
sysinfo = "0.39.3"
tokio = { version = "1.52.3", features = ["full"] }
tower-http = { version = "0.7.0", features = ["cors", "fs"] }