diff options
author | Cara Salter <cara@devcara.com> | 2022-04-27 14:44:33 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2022-04-27 14:44:33 -0400 |
commit | bc3132f22f3470d8b1d8189e23393d3bb4577480 (patch) | |
tree | b8d6466e4191a4e7e5e4a755102e82ffbff56b36 /src/main.rs | |
parent | 9696669ff126cd2bcbc31e90651b464432b7947f (diff) | |
download | solard-bc3132f22f3470d8b1d8189e23393d3bb4577480.tar.gz solard-bc3132f22f3470d8b1d8189e23393d3bb4577480.zip |
List waifus
Also use environment variables and new error types
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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::<tower::timeout::error::Elapsed>() { |