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