kosyncrs/src/main.rs

14 lines
369 B
Rust
Raw Normal View History

2023-09-25 15:12:47 +02:00
use axum::{routing::get, Router};
#[tokio::main]
async fn main() {
// build our application with a single route
let app = Router::new().route("/", get(|| async { "Hello, World!" }));
// run it with hyper on localhost:3000
axum::Server::bind(&"0.0.0.0:3000".parse().unwrap())
.serve(app.into_make_service())
.await
.unwrap();
}