move assets, setup everything

This commit is contained in:
Agahnim 2026-03-19 15:16:04 +01:00
parent 0f1820d783
commit 2e57cf6092
75 changed files with 28 additions and 2 deletions

View file

@ -1,6 +1,8 @@
use agahnim_web_v2::templates::index::home;
use axum::{Router, routing::get};
use tower_http::services::ServeDir;
#[cfg(debug_assertions)]
use tower_livereload::LiveReloadLayer;
#[tokio::main]
async fn main() {
@ -8,6 +10,10 @@ async fn main() {
.route("/", get(home))
.nest_service("/static", ServeDir::new("static"));
// We need to include this flag so that the live reload layer isn't included when the server is built
#[cfg(debug_assertions)]
let app = app.layer(LiveReloadLayer::new());
let listener = tokio::net::TcpListener::bind("0.0.0.0:7122")
.await
.expect("Failed to bind to port 7122");