add index route

This commit is contained in:
2023-04-03 04:51:09 +03:00
parent d4ea5b55b9
commit 37137c3e84
3 changed files with 15 additions and 1 deletions

12
src/routes/index.rs Normal file
View File

@ -0,0 +1,12 @@
use axum::{response::IntoResponse, Json};
use serde_json::json;
pub async fn index_route() -> impl IntoResponse {
let data = json!({
"name": "liquid-rescale-api",
"version": env!("CARGO_PKG_VERSION"),
"about": "Welcome traveler!"
});
Json(data)
}

View File

@ -1,2 +1,3 @@
pub mod health;
pub mod index;
pub mod liquid;