23 lines
430 B
Rust
23 lines
430 B
Rust
|
use axum::{
|
||
|
routing::{get, post},
|
||
|
Router,
|
||
|
};
|
||
|
|
||
|
mod greet;
|
||
|
mod health_check;
|
||
|
mod index;
|
||
|
mod subscribe;
|
||
|
|
||
|
use greet::greet;
|
||
|
use health_check::health_check;
|
||
|
use index::index;
|
||
|
use subscribe::subscribe;
|
||
|
|
||
|
pub(crate) fn routes() -> Router {
|
||
|
Router::new()
|
||
|
.route("/", get(index))
|
||
|
.route("/subscriptions", post(subscribe))
|
||
|
.route("/:name", get(greet))
|
||
|
.route("/health_check", get(health_check))
|
||
|
}
|