aboutsummaryrefslogtreecommitdiff
path: root/server/src/config.rs
blob: 10b5b5f1a11d71b455604091da20d15a7b2909fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::{fs::File, path::PathBuf};

use serde::{Deserialize, Serialize};

#[derive(Debug, Deserialize, Serialize, Default)]
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()
}