Fix frontend static file serving and RUST_LOG
This commit is contained in:
parent
cf7e63d9df
commit
5c550a1f31
2 changed files with 6 additions and 2 deletions
|
|
@ -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
|
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 PORT=8080
|
||||||
ENV RUST_LOG=release
|
ENV RUST_LOG=info
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,10 @@ use axum::{
|
||||||
};
|
};
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use tower_http::cors::{Any, CorsLayer};
|
use tower_http::{
|
||||||
|
cors::{Any, CorsLayer},
|
||||||
|
services::ServeDir,
|
||||||
|
};
|
||||||
|
|
||||||
use crate::api::AppState;
|
use crate::api::AppState;
|
||||||
use crate::spotdl::SpotdlService;
|
use crate::spotdl::SpotdlService;
|
||||||
|
|
@ -31,6 +34,7 @@ async fn main() {
|
||||||
.route("/api/artist/info", get(api::artist_info_handler))
|
.route("/api/artist/info", get(api::artist_info_handler))
|
||||||
.route("/api/browse", get(api::browse_handler))
|
.route("/api/browse", get(api::browse_handler))
|
||||||
.route("/api/recommendations", get(api::recommendations_handler))
|
.route("/api/recommendations", get(api::recommendations_handler))
|
||||||
|
.nest_service("/", ServeDir::new("static"))
|
||||||
.layer(cors)
|
.layer(cors)
|
||||||
.with_state(app_state);
|
.with_state(app_state);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue