use axum::{routing::get, Router}; use tower_service::Service; use worker::*; fn router() -> Router { Router::new().route("/", get(root)) } #[event(fetch)] async fn fetch( req: HttpRequest, _env: Env, _ctx: Context, ) -> Result> { Ok(router().call(req).await?) } pub async fn root() -> &'static str { "Hello Axum!" }