refactor: move server to own package; set up workspace dependencies

main
Jef Roosens 2025-04-05 10:19:19 +02:00
parent 279983c64c
commit 7abce21aee
Signed by: Jef Roosens
GPG Key ID: 02D4C0997E74717B
34 changed files with 41 additions and 30 deletions

2
Cargo.lock generated
View File

@ -1243,7 +1243,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e"
[[package]]
name = "otter"
name = "otterd"
version = "0.1.0"
dependencies = [
"axum",

View File

@ -1,30 +1,12 @@
[workspace]
resolver = '2'
members = [
'server',
'gpodder',
'gpodder_sqlite'
]
[package]
name = "otter"
version = "0.1.0"
edition = "2021"
[dependencies]
gpodder = { path = "./gpodder" }
gpodder_sqlite = { path = "./gpodder_sqlite" }
axum = { version = "0.8.1", features = ["macros"] }
axum-extra = { version = "0.10", features = ["cookie", "typed-header"] }
chrono = { version = "0.4.39", features = ["serde"] }
clap = { version = "4.5.30", features = ["derive", "env"] }
cookie = "0.18.1"
figment = { version = "0.10.19", features = ["env", "toml"] }
http-body-util = "0.1.3"
[workspace.dependencies]
rand = "0.8.5"
serde = { version = "1.0.218", features = ["derive"] }
tokio = { version = "1.43.0", features = ["full"] }
tower-http = { version = "0.6.2", features = ["set-header", "trace"] }
tracing = "0.1.41"
tracing-subscriber = "0.3.19"
tera = "1.20.0"
axum-range = "0.5.0"
chrono = "0.4.39"

View File

@ -4,6 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
chrono = { version = "0.4.39", features = ["serde"] }
rand = { workspace = true }
chrono = { workspace = true }
argon2 = "0.5.3"
rand = "0.8.5"

View File

@ -9,12 +9,14 @@ harness = false
[dependencies]
gpodder = { path = "../gpodder" }
rand = { workspace = true }
tracing = { workspace = true }
chrono = { workspace = true, features = ["serde"] }
libsqlite3-sys = { version = "0.31.0", features = ["bundled"] }
diesel = { version = "2.2.7", features = ["r2d2", "sqlite", "returning_clauses_for_sqlite_3_35"] }
diesel_migrations = { version = "2.2.0", features = ["sqlite"] }
tracing = "0.1.41"
chrono = { version = "0.4.39", features = ["serde"] }
rand = "0.8.5"
libsqlite3-sys = { version = "0.31.0", features = ["bundled"] }
[dev-dependencies]
criterion = "0.5.1"

27
server/Cargo.toml 100644
View File

@ -0,0 +1,27 @@
[package]
name = "otterd"
version = "0.1.0"
edition = "2021"
[dependencies]
gpodder = { path = "../gpodder" }
gpodder_sqlite = { path = "../gpodder_sqlite" }
chrono = { workspace = true, features = ["serde"] }
rand = { workspace = true }
tracing = { workspace = true }
serde = { version = "1.0.218", features = ["derive"] }
figment = { version = "0.10.19", features = ["env", "toml"] }
clap = { version = "4.5.30", features = ["derive", "env"] }
tower-http = { version = "0.6.2", features = ["set-header", "trace"] }
axum = { version = "0.8.1", features = ["macros"] }
axum-extra = { version = "0.10", features = ["cookie", "typed-header"] }
axum-range = "0.5.0"
cookie = "0.18.1"
http-body-util = "0.1.3"
tokio = { version = "1.43.0", features = ["full"] }
tracing-subscriber = "0.3.19"
tera = "1.20.0"

View File

@ -61,7 +61,6 @@ struct LoginForm {
async fn post_login(
State(ctx): State<Context>,
user_agent: Option<TypedHeader<UserAgent>>,
_headers: HeaderMap,
jar: CookieJar,
Form(login): Form<LoginForm>,
) -> AppResult<Response> {