Skip to main content

init

Function init 

Source
pub async fn init() -> Result<&'static DatabaseConnection, DbErr>
Expand description

Connects (via connect) and installs the process-global pool, returning a reference to it. Idempotent: if already initialised, the existing connection is returned and the new one discarded. Call once at server boot.