mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-31 07:56:28 +00:00 
			
		
		
		
	Merge #1292
1292: return a 200 on / when meilisearch is running in production r=MarinPostma a=irevoire close #1235 Co-authored-by: tamo <tamo@meilisearch.com> Co-authored-by: Irevoire <irevoire@protonmail.ch>
This commit is contained in:
		| @@ -63,6 +63,7 @@ pub fn create_app( | ||||
|             .service(routes::load_css) | ||||
|     } else { | ||||
|         app | ||||
|             .service(routes::running) | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -29,6 +29,7 @@ impl IndexUpdateResponse { | ||||
|     } | ||||
| } | ||||
|  | ||||
| /// Return the dashboard, should not be used in production. See [running] | ||||
| #[get("/")] | ||||
| pub async fn load_html() -> HttpResponse { | ||||
|     HttpResponse::Ok() | ||||
| @@ -36,6 +37,17 @@ pub async fn load_html() -> HttpResponse { | ||||
|         .body(include_str!("../../public/interface.html").to_string()) | ||||
| } | ||||
|  | ||||
| /// Always return a 200 with: | ||||
| /// ```json | ||||
| /// { | ||||
| ///     "status": "Meilisearch is running" | ||||
| /// } | ||||
| /// ``` | ||||
| #[get("/")] | ||||
| pub async fn running() -> HttpResponse { | ||||
|     HttpResponse::Ok().json(serde_json::json!({ "status": "MeiliSearch is running" })) | ||||
| } | ||||
|  | ||||
| #[get("/bulma.min.css")] | ||||
| pub async fn load_css() -> HttpResponse { | ||||
|     HttpResponse::Ok() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user