2023-08-03 17:57:16 -04:00
|
|
|
use axum::{Router, routing::get};
|
|
|
|
|
|
|
|
async fn index() -> &'static str {
|
|
|
|
"hi world"
|
|
|
|
}
|
|
|
|
|
|
|
|
#[tokio::main]
|
|
|
|
async fn main() {
|
|
|
|
let app = Router::new().route("/", get(index));
|
|
|
|
|
2023-08-03 19:33:17 -04:00
|
|
|
axum::Server::bind(&"0.0.0.0:8000".parse().unwrap())
|
2023-08-03 17:57:16 -04:00
|
|
|
.serve(app.into_make_service())
|
|
|
|
.await
|
|
|
|
.unwrap();
|
|
|
|
}
|