refactor: use api::add_routes() and docs::add_routes() to register server routes
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
use anyhow::Result;
|
||||
use axum::{
|
||||
routing::get,
|
||||
Router,
|
||||
};
|
||||
use clap::Command;
|
||||
@@ -68,6 +67,10 @@ async fn run_server(
|
||||
)
|
||||
.with_state(state);
|
||||
|
||||
// Add API and documentation routes
|
||||
let app = api::add_routes(app);
|
||||
let app = docs::add_routes(app);
|
||||
|
||||
let addr: SocketAddr = if config.address.starts_with('/') || config.address.starts_with("./") {
|
||||
// Unix socket - not supported by axum directly, fall back to TCP
|
||||
warn!("Unix sockets not yet implemented, falling back to TCP on 127.0.0.1:8080");
|
||||
|
||||
Reference in New Issue
Block a user