7170be016d
Adds `memory-serve` 2.1 as an optional workspace dependency, a `build.rs` that runs `load_directory` only when `CARGO_FEATURE_EMBED_WEB` is set, a `web_assets` module serving `web/dist` at `/` with SPA fallback (200 OK) for unknown client-side routes, and a feature-gated integration test. The default build (no feature) compiles and tests cleanly without `web/dist`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
46 lines
942 B
TOML
46 lines
942 B
TOML
[package]
|
|
name = "server"
|
|
version = "0.0.0"
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
[lib]
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "server"
|
|
path = "src/main.rs"
|
|
|
|
[features]
|
|
embed-web = ["dep:memory-serve"]
|
|
|
|
[dependencies]
|
|
tokio.workspace = true
|
|
axum.workspace = true
|
|
clap.workspace = true
|
|
anyhow.workspace = true
|
|
tracing.workspace = true
|
|
tracing-subscriber.workspace = true
|
|
api = { path = "../api" }
|
|
auth = { path = "../auth" }
|
|
db = { path = "../db" }
|
|
domain = { path = "../domain" }
|
|
search = { path = "../search" }
|
|
rpassword.workspace = true
|
|
memory-serve = { workspace = true, optional = true }
|
|
|
|
[build-dependencies]
|
|
memory-serve = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
reqwest.workspace = true
|
|
serde_json.workspace = true
|
|
tower.workspace = true
|
|
http-body-util.workspace = true
|
|
api = { path = "../api" }
|
|
auth = { path = "../auth" }
|
|
db = { path = "../db" }
|
|
domain = { path = "../domain" }
|
|
sqlx.workspace = true
|
|
temp-env = "0.3"
|