From 5c550a1f319c109026342560ad8f98fe973f0df0 Mon Sep 17 00:00:00 2001 From: Khoa Vo Date: Fri, 20 Mar 2026 21:38:37 +0700 Subject: [PATCH] Fix frontend static file serving and RUST_LOG --- Dockerfile | 2 +- backend-rust/src/main.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 17ebdba..c754456 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,7 +45,7 @@ COPY --from=frontend-builder /app/frontend/dist /app/static RUN mkdir -p /tmp/spotify-clone-cache /tmp/spotify-clone-downloads && chmod 777 /tmp/spotify-clone-cache /tmp/spotify-clone-downloads ENV PORT=8080 -ENV RUST_LOG=release +ENV RUST_LOG=info EXPOSE 8080 diff --git a/backend-rust/src/main.rs b/backend-rust/src/main.rs index 8c7c680..08f3e4b 100644 --- a/backend-rust/src/main.rs +++ b/backend-rust/src/main.rs @@ -8,7 +8,10 @@ use axum::{ }; use std::net::SocketAddr; use std::sync::Arc; -use tower_http::cors::{Any, CorsLayer}; +use tower_http::{ + cors::{Any, CorsLayer}, + services::ServeDir, +}; use crate::api::AppState; use crate::spotdl::SpotdlService; @@ -31,6 +34,7 @@ async fn main() { .route("/api/artist/info", get(api::artist_info_handler)) .route("/api/browse", get(api::browse_handler)) .route("/api/recommendations", get(api::recommendations_handler)) + .nest_service("/", ServeDir::new("static")) .layer(cors) .with_state(app_state);