phoebe/phoebe/src/lib.rs

15 lines
398 B
Rust
Raw Normal View History

2022-04-11 11:52:29 +00:00
pub use mid_chat;
2022-04-08 16:52:59 +00:00
pub mod db;
pub mod prelude;
pub mod service;
2022-04-11 11:52:29 +00:00
pub type ChatEventSender = tokio::sync::broadcast::Sender<mid_chat::event::ChatEvent>;
pub type ChatEventReceiver = tokio::sync::broadcast::Receiver<mid_chat::event::ChatEvent>;
2022-04-08 16:52:59 +00:00
pub async fn open_core_db() -> sqlx::Result<sqlx::SqlitePool> {
let db = db::open("main").await?;
sqlx::migrate!().run(&db).await?;
Ok(db)
}