Added config support
This commit is contained in:
@@ -58,11 +58,13 @@ async fn main() -> anyhow::Result<()> {
|
||||
let bind = format!("{}:{}", config.web.bind, config.web.port);
|
||||
tracing::info!(bind = %bind, "starting server");
|
||||
|
||||
let config_path = cli.config.clone();
|
||||
let state = web::Data::new(AppState {
|
||||
db,
|
||||
mb_client,
|
||||
search,
|
||||
config,
|
||||
config: std::sync::Arc::new(tokio::sync::RwLock::new(config)),
|
||||
config_path: config_path,
|
||||
tasks: TaskManager::new(),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user