feat: 新增 web 端 — axum HTTP 服务 + Docker 化
新增 workspace crate : - axum 0.8 + tokio 异步 HTTP 服务 - / → 嵌入式 HTML 页面(输入→实时预览→下载/复制) - /api/qr?text=&level=M&margin=4&size=8 → PNG - Dockerfile: rust-alpine 多阶段构建,镜像仅 ~12MB - Cargo.toml: workspace 新增 web 成员 部署: docker build -t qrgen-web -f web/Dockerfile . docker run -p 3000:3000 qrgen-web Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
[package]
|
||||
name = "qrgen-web"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
authors.workspace = true
|
||||
|
||||
[dependencies]
|
||||
qr-core = { path = "../core" }
|
||||
axum = "0.8"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
tower-http = { version = "0.6", features = ["cors"] }
|
||||
Reference in New Issue
Block a user