summaryrefslogtreecommitdiff
path: root/src/services/db.rs
blob: baf73e9bc32dfa1a5eced2a5145f76fc93dc0b46 (plain)
use exun::*;
use sqlx::MySqlPool;

pub async fn initialize(db: &str, user: &str, password: &str) -> Result<MySqlPool, RawUnexpected> {
	let url = format!("mysql://{user}:{password}@localhost/{db}");
	MySqlPool::connect(&url).await.unexpect()
}