feat: db connection and alive endpoint

This commit is contained in:
Ahmet Kaan GÜMÜŞ 2024-11-20 00:16:31 +03:00
parent b3e49f414e
commit c61ebe127a
6 changed files with 55 additions and 11 deletions

View file

@ -1 +1,8 @@
use surrealdb::{
engine::remote::ws::{Client, Ws},
Surreal,
};
pub async fn establish_connection() -> Surreal<Client> {
Surreal::new::<Ws>("localhost:8000").await.unwrap()
}