aboutsummaryrefslogtreecommitdiff
path: root/server/src/config.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-01-18 21:49:11 +0100
committermetamuffin <metamuffin@disroot.org>2023-01-18 21:49:11 +0100
commitfbc1128f30438a4e18521073eb1bb79a77a7f20d (patch)
tree94c0a41f6d3a4309944a05eb4aaff5ab2e3d24e4 /server/src/config.rs
parentaaf7b47547e7dd43efb4da2f2790745521cd6eea (diff)
downloadjellything-fbc1128f30438a4e18521073eb1bb79a77a7f20d.tar
jellything-fbc1128f30438a4e18521073eb1bb79a77a7f20d.tar.bz2
jellything-fbc1128f30438a4e18521073eb1bb79a77a7f20d.tar.zst
first steps for registration
Diffstat (limited to 'server/src/config.rs')
-rw-r--r--server/src/config.rs14
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()
+}