diff options
Diffstat (limited to 'server/src/config.rs')
-rw-r--r-- | server/src/config.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/src/config.rs b/server/src/config.rs new file mode 100644 index 0000000..1edf5e5 --- /dev/null +++ b/server/src/config.rs @@ -0,0 +1,14 @@ +use std::{fs::File, path::PathBuf}; + +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Deserialize, Serialize)] +pub struct GlobalConfig { + pub brand: String, + pub database_path: PathBuf, + pub library_path: PathBuf, +} + +pub fn load_global_config() -> GlobalConfig { + serde_json::from_reader(File::open("data/config.json").unwrap()).unwrap() +} |