diff --git a/.cargo/config.toml b/.cargo/config.toml index e7ba845..8b7033b 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,2 @@ [env] -STATIC_FILE_PATH = { value = "static", relative = true } \ No newline at end of file +LOCALHUB_STATIC_FILE_PATH = { value = "static", relative = true } diff --git a/src/main.rs b/src/main.rs index ef15f19..34dd09e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,10 @@ use tower_http::services::ServeDir; async fn main() -> Result<(), Box> { let app = Router::new() .route("/", get(root)) - .nest_service("/static", ServeDir::new(env::var("STATIC_FILE_PATH")?)); + .nest_service( + "/static", + ServeDir::new(env::var("LOCALHUB_STATIC_FILE_PATH")?), + ); let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await?; axum::serve(listener, app).await?;