feat(delta): test harness for web server

This commit is contained in:
Paul Makles
2023-08-27 13:01:21 +01:00
parent 73f7b8f007
commit 0542788567
8 changed files with 76 additions and 28 deletions

View File

@@ -8,14 +8,16 @@ use serde::Deserialize;
static CONFIG_BUILDER: Lazy<RwLock<Config>> = Lazy::new(|| {
RwLock::new({
Config::builder()
.add_source(File::from_str(
include_str!("../Revolt.toml"),
FileFormat::Toml,
))
.add_source(File::new("revolt.toml", FileFormat::Toml))
.build()
.unwrap()
let mut builder = Config::builder().add_source(File::from_str(
include_str!("../Revolt.toml"),
FileFormat::Toml,
));
if std::path::Path::new("revolt.toml").exists() {
builder = builder.add_source(File::new("revolt.toml", FileFormat::Toml));
}
builder.build().unwrap()
})
});