puppy/bin/server/src/main.rs

9 lines
265 B
Rust
Raw Normal View History

2024-04-16 20:57:07 +02:00
use axum::{routing::get, Router};
#[tokio::main]
async fn main() {
let app = Router::new().route("/", get(|| async { "Hello, World!" }));
let sock = tokio::net::TcpListener::bind("0.0.0.0:1312").await.unwrap();
axum::serve(sock, app).await.unwrap();
}