Adding code to use test database when in debug mode #10
@@ -30,7 +30,7 @@ pub mod db_pool {
|
||||
|
||||
pub async fn create_pool() -> Result<sqlx::PgPool, sqlx::Error> {
|
||||
#[cfg(debug_assertions)] // Example: Only load .env in debug builds
|
||||
dotenv::dotenv().ok();
|
||||
dotenvy::dotenv().ok();
|
||||
|
||||
let database_url = get_db_url().await;
|
||||
println!("Database url: {:?}", database_url);
|
||||
|
Reference in New Issue
Block a user