obscura-server 0.3.10

A server for relaying secure messages using the Signal Protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use sqlx::postgres::PgPoolOptions;
use sqlx::{Pool, Postgres};

pub mod attachment_repo;
pub mod key_repo;
pub mod message_repo;
pub mod refresh_token_repo;
pub mod user_repo;

pub type DbPool = Pool<Postgres>;

pub async fn init_pool(database_url: &str) -> Result<DbPool, sqlx::Error> {
    PgPoolOptions::new().max_connections(20).connect(database_url).await
}