add first prototype of website

This commit is contained in:
2025-08-01 13:28:42 +02:00
parent fd3863b6c8
commit 496a30a9d1
10 changed files with 959 additions and 93 deletions

19
src/main.rs Normal file
View File

@@ -0,0 +1,19 @@
use axum::{routing::get, Router};
use tower_http::services::ServeDir;
mod collector;
mod index;
mod page;
#[tokio::main]
async fn main() {
// build our application with a single route
let app = Router::new()
.route("/", get(index::index))
.route("/cam", get(collector::collector))
.fallback_service(ServeDir::new("./static/serve"));
// run our app with hyper, listening globally on port 3000
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
axum::serve(listener, app).await.unwrap();
}