use std::net::SocketAddr;
use askama_axum::Template;
use axum::{routing::get, Router};
#[derive(Template)]
#[template(path = "hello.html")]
struct HelloTemplate {}
async fn hello() -> HelloTemplate {
HelloTemplate {}
}
#[tokio::main]
async fn main() {
tracing_subscriber::fmt::init();
let app = Router::new().route("/", get(hello));
let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
tracing::info!("listening on {}", addr);
axum::Server::bind(&addr)
.serve(app.into_make_service())
.await
.unwrap();