rust backend, example nix container building

This commit is contained in:
2026-01-13 00:08:58 -05:00
commit 7e5db6b233
11 changed files with 972 additions and 0 deletions

19
src/main.rs Normal file
View File

@@ -0,0 +1,19 @@
use axum::{
routing::get,
Router,
response::Html,
};
#[tokio::main]
async fn main() {
let site = Router::new().route("/", get(root));
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
println!("Running on http://127.0.0.1:3000");
axum::serve(listener, site).await.unwrap();
}
async fn root() -> Html<&'static str> {
const HTML: &str = include_str!("../static/root.html");
Html(HTML)
}