first commit

This commit is contained in:
2026-05-18 22:32:23 +02:00
commit 2cf50b0168
10 changed files with 2045 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
use axum::Router;
use axum::routing::get;
use crate::env;
pub async fn start_api(config: env::EnvConfig) -> anyhow::Result<()> {
let app = Router::new().route("/", get(root));
let listerner = tokio::net::TcpListener::bind(format!("0.0.0.0:{}", config.http_port)).await?;
axum::serve(listerner, app)
.await
.map_err(|e| anyhow::anyhow!(e))
}
async fn root() -> &'static str {
"Hello, World!"
}