mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 06:44:27 +01:00
import routes modules in main
This commit is contained in:
parent
7d28f8cff0
commit
86211b1ddd
20
src/main.rs
20
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<dyn std::error::Error>> {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user