Basic functions, Home and Community Tab

This commit is contained in:
Malte Schröder
2025-12-17 20:41:51 +01:00
commit 506f12adc2
28 changed files with 1086 additions and 0 deletions

10
src/backend/db.rs Normal file
View File

@@ -0,0 +1,10 @@
#[cfg(feature = "ssr")]
use sqlx::SqlitePool;
#[cfg(feature = "ssr")]
pub async fn build_db_pool() -> SqlitePool {
let database_url = "sqlite:community.db";
let pool = SqlitePool::connect(database_url).await.expect("DB Fehler");
sqlx::migrate!("./migrations").run(&pool).await.expect("Migration Fehler");
pool
}