summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index ffdce27..dfe1447 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -3,6 +3,8 @@ use std::env;
use dotenvy::dotenv;
use sqlx::sqlite::SqlitePoolOptions;
+use self::db::story;
+
pub mod db;
mod error;
mod handlers;
@@ -23,6 +25,10 @@ async fn main() {
.await
.expect("Failed to run migrations");
+ story::synchronize_story_files(&pool)
+ .await
+ .expect("Failed to synchronize files");
+
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
axum::serve(listener, handlers::router(pool).await.into_make_service())
.await