htmx and Tailwind CSS production setup

This commit is contained in:
Alphonse Paix
2025-09-16 19:42:35 +02:00
parent ee72073ff5
commit 626726d206
13 changed files with 1376 additions and 308 deletions

View File

@@ -13,7 +13,7 @@ use axum_server::tls_rustls::RustlsConfig;
use secrecy::ExposeSecret;
use sqlx::{PgPool, postgres::PgPoolOptions};
use std::{net::TcpListener, sync::Arc};
use tower_http::trace::TraceLayer;
use tower_http::{services::ServeDir, trace::TraceLayer};
use tower_sessions::SessionManagerLayer;
use tower_sessions_redis_store::{
RedisStore,
@@ -126,6 +126,7 @@ pub fn app(
.route("/logout", post(logout))
.layer(middleware::from_fn(require_auth));
Router::new()
.nest_service("/assets", ServeDir::new("assets"))
.route("/", get(home))
.route("/login", get(get_login).post(post_login))
.route("/health_check", get(health_check))