CD7SHAY5ZORPY4QWS2JHC33YN7O5AOC2LUMQYZH2THR6H2W7P5VQC
println!("Hello, world!");
let rt = tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()
.unwrap();
rt.block_on(serve());
}
async fn serve() {
let routes_hello = Router::new().route(
"/hello",
get(|| async { Html("Hello <strong>World!!!</strong>") }),
);
// region: --- Start Server
let addr = SocketAddr::from(([127,0,0,1], 3000));
println!("->> LISTENING on {addr}\n");
axum::Server::bind(&addr)
.serve(routes_hello.into_make_service())
.await
.unwrap();
// endregion: --- Start Server
axum = "0.6.20"
tokio = { version = "1.32.0", features = ["rt-multi-thread"] }