This commit is contained in:
@@ -3,17 +3,15 @@ use std::net::SocketAddr;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
// Создаем роутер, который на "/" отдает HTML
|
||||
let app = Router::new().route("/", get(handler));
|
||||
|
||||
// Слушаем порт 3000
|
||||
let addr = SocketAddr::from(([0, 0, 0, 0], 3000));
|
||||
println!("listening on {}", addr);
|
||||
println\!("listening on {}", addr);
|
||||
|
||||
let listener = tokio::net::TcpListener::bind(addr).await.unwrap();
|
||||
axum::serve(listener, app).await.unwrap();
|
||||
}
|
||||
|
||||
async fn handler() -> Html<&'static str> {
|
||||
Html("<h1>Hello on mikhailkilin.ru! 🚀</h1>")
|
||||
}
|
||||
Html("<h1>Mikhail Kilin — Personal Site</h1><p>Deployed via Woodpecker CI + ArgoCD</p>")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user