summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 168a5f5..1947ff8 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -5,16 +5,19 @@ use hyper::{
use std::convert::Infallible; // TODO:
mod config;
+mod error;
mod handlers;
mod models;
+mod repo;
mod templates;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let addr = config::INSTANCE.addr;
- let make_svc =
- make_service_fn(move |_conn| async { Ok::<_, Infallible>(service_fn(handlers::router)) });
+ let make_svc = make_service_fn(move |_conn| async {
+ Ok::<_, Infallible>(service_fn(|req| handlers::router(req)))
+ });
let server = Server::bind(&addr).serve(make_svc);
let graceful = server.with_graceful_shutdown(shutdown_signal());