add dev resources; plumb GUI_ENV_FILE/API_ENV_FILE/API_DESI_DATA into run targets
CI / Detect changed paths (pull_request) Failing after 33m59s
CI / Infra unit tests, vet, and preview (pull_request) Has been skipped
CI / API unit tests and lint (pull_request) Failing after 31m0s
CI / Odin unit tests and build (pull_request) Failing after 31m9s

This commit is contained in:
2026-09-07 14:55:49 -06:00
parent ba24005bfb
commit 1443369f6c
18 changed files with 490 additions and 58 deletions
+14 -1
View File
@@ -1,5 +1,10 @@
use std::path::PathBuf;
pub struct Config {
pub bind_addr: String,
/// Path to a DESI data file (JSON) to serve; `None` falls back to the
/// built-in placeholder catalogs.
pub desi_data: Option<PathBuf>,
}
impl Config {
@@ -7,6 +12,14 @@ impl Config {
let bind_addr =
std::env::var("API_BIND_ADDR").unwrap_or_else(|_| "0.0.0.0:8080".to_string());
Ok(Self { bind_addr })
let desi_data = std::env::var("API_DESI_DATA")
.ok()
.filter(|s| !s.is_empty())
.map(PathBuf::from);
Ok(Self {
bind_addr,
desi_data,
})
}
}