summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 85ff708..d5a35b7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,4 +1,4 @@
-use std::{collections::HashMap, fs::File, path::PathBuf};
+use std::{fs::File, path::PathBuf};
use tower_http::services::ServeDir;
use tracing::level_filters::LevelFilter;
@@ -21,7 +21,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
};
- let state = AppState::spawn_services(config.services);
+ let state = AppState::new(config.services);
let mut router = statsrv::router().with_state(state);
if let Some(path) = config.serve_dir {
@@ -41,7 +41,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
pub struct Config {
pub serve_dir: Option<PathBuf>,
pub address: String,
- pub services: HashMap<String, ServiceConfig>,
+ pub services: Vec<ServiceConfig>,
}
impl Config {