add static route for main.css
Some checks failed
Build and publish the docker image / build (push) Failing after 10s
Some checks failed
Build and publish the docker image / build (push) Failing after 10s
Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
@ -40,16 +40,10 @@ impl Settings {
|
||||
let mut s = Config::builder();
|
||||
|
||||
// setting default values
|
||||
const CURRENT_DIR: &str = "./config.toml";
|
||||
const ETC: &str = "/etc/libmedium/config.toml";
|
||||
|
||||
if let Ok(path) = env::var("LIBMEDIUM") {
|
||||
s = s.add_source(File::with_name(&path));
|
||||
} else if Path::new(CURRENT_DIR).exists() {
|
||||
// merging default config from file
|
||||
s = s.add_source(File::with_name(CURRENT_DIR));
|
||||
} else if Path::new(ETC).exists() {
|
||||
s = s.add_source(File::with_name(ETC));
|
||||
} else if Path::new("./config.toml").exists() {
|
||||
s = s.add_source(File::with_name("./config.toml");
|
||||
} else {
|
||||
log::warn!("configuration file not found");
|
||||
}
|
||||
|
Reference in New Issue
Block a user