Files
tavernworks/bard/src/lib.rs

20 lines
374 B
Rust
Raw Normal View History

//! Dioxus components that will display a Tavern blogging system Blog.
mod info;
use tavern::Database;
pub use crate::info::{get_name, get_version};
pub async fn init_database<P>(path: P)
-> Result<std::sync::Arc<Database>, Box<dyn std::error::Error>>
where P: AsRef<std::path::Path>
{
let db = Database::open(path).await?;
Ok(std::sync::Arc::new(db))
}