You've already forked AstralRinth
forked from didirus/AstralRinth
Finish database code
This commit is contained in:
@@ -4,7 +4,7 @@ use dotenv::dotenv;
|
||||
use std::env;
|
||||
|
||||
pub fn connect() -> PgConnection{
|
||||
dotenv.ok();
|
||||
dotenv().ok();
|
||||
|
||||
let database_url = env::var("DATABASE_URL").expect("DATABASE_URL must be set!");
|
||||
PgConnection::establish(&database_url).expect(&format!("Error connecting to {}", database_url))
|
||||
|
||||
Reference in New Issue
Block a user