23 lines
491 B
Rust
23 lines
491 B
Rust
use axum::{
|
|
http::StatusCode,
|
|
response::{Html, IntoResponse},
|
|
routing::get,
|
|
Router,
|
|
};
|
|
|
|
pub struct RootRoute;
|
|
impl RootRoute {
|
|
pub fn routes() -> Router {
|
|
Router::new().route("/", get(RootRoute::root))
|
|
// .fallback(RootRoute::not_found)
|
|
}
|
|
|
|
async fn root() -> Html<&'static str> {
|
|
Html("<p>Copyright Wyatt J. Miller 2024</p>")
|
|
}
|
|
|
|
async fn not_found() -> impl IntoResponse {
|
|
(StatusCode::NOT_FOUND, "¯\\_(ツ)_/¯")
|
|
}
|
|
}
|