phoebe/phoebe/src/lib.rs

15 lines
378 B
Rust
Raw Normal View History

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