hash statics
This commit is contained in:
parent
a45bf45015
commit
d925573629
12 changed files with 139 additions and 1464 deletions
13
src/main.rs
13
src/main.rs
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue