mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
add interface endpoint & health endpoint
This commit is contained in:
parent
6d6c8e8fb2
commit
540308dc63
5 changed files with 146 additions and 40 deletions
|
@ -1,8 +1,9 @@
|
|||
|
||||
use actix_web::*;
|
||||
use serde::Serialize;
|
||||
|
||||
pub mod document;
|
||||
// pub mod health;
|
||||
pub mod health;
|
||||
// pub mod index;
|
||||
// pub mod key;
|
||||
// pub mod search;
|
||||
|
@ -27,10 +28,24 @@ impl IndexUpdateResponse {
|
|||
}
|
||||
}
|
||||
|
||||
#[get("/")]
|
||||
pub async fn load_html() -> HttpResponse {
|
||||
HttpResponse::Ok()
|
||||
.content_type("text/html; charset=utf-8")
|
||||
.body(include_str!("../../public/interface.html").to_string())
|
||||
}
|
||||
|
||||
#[get("/bulma.min.css")]
|
||||
pub async fn load_css() -> HttpResponse {
|
||||
HttpResponse::Ok()
|
||||
.content_type("text/css; charset=utf-8")
|
||||
.body(include_str!("../../public/bulma.min.css").to_string())
|
||||
}
|
||||
|
||||
// pub fn load_routes(app: &mut tide::Server<Data>) {
|
||||
// app.at("/").get(|_| async {
|
||||
// tide::Response::new(200)
|
||||
// .body_string(include_str!("../../public/interface.html").to_string())
|
||||
// .body_string()
|
||||
// .set_mime(mime::TEXT_HTML_UTF_8)
|
||||
// });
|
||||
// app.at("/bulma.min.css").get(|_| async {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue