init_db

Function init_db 

Source
pub async fn init_db() -> Result<Pool<Sqlite>, Error>
Expand description

Initialize the database connection.

This function creates a connection pool to the SQLite database specified in the DATABASE_URL environment variable. If the variable is not set, it defaults to sqlite:./users.db.db.

ยงReturns

A Result containing the connection pool or an error if the connection fails.