diff --git a/src/main.rs b/src/main.rs index c5e2d11e6..9e69c4091 100644 --- a/src/main.rs +++ b/src/main.rs @@ -83,18 +83,20 @@ async fn main() -> Result<(), MainError> { } async fn run_http(data: Data, opt: Opt, enable_frontend: bool) -> Result<(), Box> { + use meilisearch::routes::*; + let http_server = HttpServer::new(move || { let app = App::new() .configure(|c| configure_data(c, &data)) - .configure(meilisearch::routes::document::services) - .configure(meilisearch::routes::index::services) - .configure(meilisearch::routes::search::services) - .configure(meilisearch::routes::settings::services) - .configure(meilisearch::routes::stop_words::services) - .configure(meilisearch::routes::synonym::services) - .configure(meilisearch::routes::health::services) - .configure(meilisearch::routes::stats::services) - .configure(meilisearch::routes::key::services); + .configure(document::services) + .configure(index::services) + .configure(search::services) + .configure(settings::services) + .configure(stop_words::services) + .configure(synonym::services) + .configure(health::services) + .configure(stats::services) + .configure(key::services); //.configure(routes::dump::services); let app = if enable_frontend { app