From bc3132f22f3470d8b1d8189e23393d3bb4577480 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Wed, 27 Apr 2022 14:44:33 -0400 Subject: List waifus Also use environment variables and new error types --- src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 5777fa6..d2f83a4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,8 +14,14 @@ use tower_http::trace::TraceLayer; use tracing_subscriber::prelude::*; +mod errors; + +mod handlers; + #[tokio::main] async fn main() { + kankyo::init(); + color_eyre::install().unwrap(); tracing_subscriber::registry() .with(tracing_subscriber::EnvFilter::new( std::env::var("RUST_LOG") @@ -26,6 +32,7 @@ async fn main() { let app = Router::new() .route("/health", get(health_check)) + .route("/waifus/list", get(handlers::waifus::list)) .layer( ServiceBuilder::new() .layer(HandleErrorLayer::new(|error: BoxError| async move { if error.is::() { -- cgit v1.2.3