chore(server): scaffold axum com health endpoint e testes
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
pub mod health;
|
||||
|
||||
use axum::{routing::get, Router};
|
||||
use tower_http::cors::CorsLayer;
|
||||
use crate::state::SharedState;
|
||||
|
||||
pub fn router(state: SharedState) -> Router {
|
||||
let api = Router::new()
|
||||
.route("/health", get(health::health))
|
||||
.with_state(state);
|
||||
|
||||
Router::new()
|
||||
.nest("/api/v1", api)
|
||||
.layer(CorsLayer::permissive())
|
||||
}
|
||||
Reference in New Issue
Block a user