Skip to main content

build

Function build 

Source
pub fn build() -> Router<()>
Expand description

Create a new router builder

This is the recommended entry point for creating routers. Returns an Axum Router that can be configured using the fluent builder API.

§Example

use rust_api_core::{router, routing};

let app = router::build()
    .api_route(__health_check_route, health_check)
    .layer(TraceLayer::new_for_http())
    .finish();