use serde_json::{Value, from_str};
pub struct Config {
pub server: String,
pub api_key: String,
}
impl Config {
pub fn get() -> Self {
let config_json = std::fs::read_to_string("tests/tests_config.json").unwrap();
let config: Value = from_str(&config_json).unwrap();
let server: String = config["server"].as_str().unwrap().to_string();
let api_key: String = config["api_key"].as_str().unwrap().to_string();
Config { server, api_key }
}
}