feat: bootstrap htmx templating system
This commit is contained in:
parent
ad015b47e4
commit
b3e49be299
10 changed files with 210 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use std::time::Duration;
|
||||
use std::{sync::Arc, time::Duration};
|
||||
|
||||
use crate::server;
|
||||
|
||||
|
|
@ -9,12 +9,17 @@ pub fn serve(config: &crate::config::Config) -> u8 {
|
|||
|
||||
tracing::info!("Initializing database and running migrations");
|
||||
|
||||
// TODO remove unwraps
|
||||
let store =
|
||||
gpodder_sqlite::SqliteRepository::from_path(config.data_dir.join(crate::DB_FILENAME))
|
||||
.unwrap();
|
||||
let tera = crate::web::initialize_tera().unwrap();
|
||||
let store = gpodder::GpodderRepository::new(store);
|
||||
|
||||
let ctx = server::Context { store };
|
||||
let ctx = server::Context {
|
||||
store,
|
||||
tera: Arc::new(tera),
|
||||
};
|
||||
let app = server::app(ctx.clone());
|
||||
|
||||
let rt = tokio::runtime::Builder::new_multi_thread()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue