From dab09c4e4d1e4b21216b630bb44e57f597dfe85b Mon Sep 17 00:00:00 2001 From: WriterV2 Date: Tue, 5 Nov 2024 16:33:19 +0100 Subject: Feat: auto file (pdf + epub) creation and synchronization for story --- src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main.rs') 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 -- cgit v1.2.3