separation of database (#1)

Reviewed-on: GKaszewski/libertas#1
This commit was merged in pull request #1.
This commit is contained in:
2025-11-03 02:26:19 +00:00
parent 8b98df745c
commit 39ee8d52a4
21 changed files with 407 additions and 140 deletions

View File

@@ -28,8 +28,10 @@ async fn main() -> anyhow::Result<()> {
let addr: SocketAddr = config.server_address.parse()?;
let app_state = factory::build_app_state(config).await?;
let max_upload_size =
(app_state.config.max_upload_size_mb.unwrap_or(100) * 1024 * 1024) as usize;
let app = routes::api_routes().with_state(app_state);
let app = routes::api_routes(max_upload_size).with_state(app_state);
println!("Starting server at http://{}", addr);