mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +02:00
Add SpaRouter (#904)
This commit is contained in:
@@ -4,6 +4,9 @@ use axum::{handler::Handler, Router};
|
||||
|
||||
mod resource;
|
||||
|
||||
#[cfg(feature = "spa")]
|
||||
mod spa;
|
||||
|
||||
#[cfg(feature = "typed-routing")]
|
||||
mod typed;
|
||||
|
||||
@@ -15,6 +18,9 @@ pub use axum_macros::TypedPath;
|
||||
#[cfg(feature = "typed-routing")]
|
||||
pub use self::typed::{FirstElementIs, TypedPath};
|
||||
|
||||
#[cfg(feature = "spa")]
|
||||
pub use self::spa::SpaRouter;
|
||||
|
||||
/// Extension trait that adds additional methods to [`Router`].
|
||||
pub trait RouterExt<B>: sealed::Sealed {
|
||||
/// Add a typed `GET` route to the router.
|
||||
|
||||
Reference in New Issue
Block a user