hash statics

This commit is contained in:
Robert Perce 2025-12-01 15:23:56 -06:00
parent a45bf45015
commit d925573629
12 changed files with 139 additions and 1464 deletions

View file

@ -182,19 +182,12 @@ async fn serve(port: &u32) -> Result<(), anyhow::Error> {
.route_layer(login_required!(Backend, login_url = "/login"))
.merge(auth::router())
.merge(ics::router())
.nest_service("/static", ServeDir::new("./static"))
.nest_service("/static", ServeDir::new("./hashed_static"))
.layer(auth_layer)
.with_state(state);
let mut listenfd = listenfd::ListenFd::from_env();
let listener = match listenfd.take_tcp_listener(0)? {
Some(listener) => {
listener.set_nonblocking(true)?;
TcpListener::from_std(listener)
}
None => TcpListener::bind(format!("0.0.0.0:{}", port)).await,
}?;
tracing::debug!("Starting axum on 0.0.0.0:3000...");
let listener = TcpListener::bind(format!("0.0.0.0:{}", port)).await?;
tracing::debug!("Starting axum on 0.0.0.0:{}...", port);
axum::serve(listener, app)
.with_graceful_shutdown(shutdown_signal(deletion_task.abort_handle()))
.await