DATA_PATH env var

This commit is contained in:
Paul Zinselmeyer 2023-10-18 16:31:02 +02:00
parent ac084a9288
commit 72ec33636b

View file

@ -101,13 +101,15 @@ async fn main() {
.await
.expect("Oidc Authentication Client");
let garbage_collector = GarbageCollector::new("./data".to_string()).await;
let data_path = env::var("DATA_PATH").expect("DATA_PATH env var");
let garbage_collector = GarbageCollector::new(data_path.clone()).await;
garbage_collector.spawn();
let state: AppState = AppState {
application_base,
oidc_application,
data: "./data".to_string(),
data: data_path,
key_salt: KeySalt::from_str(&env::var("KEY_SALT").expect("KEY_SALT env var"))
.expect("KEY SALT valid hex"),
id_salt: IdSalt::from_str(&env::var("ID_SALT").expect("ID_SALT env var"))