refactor to use default localhost IPs instead of localhost

This commit is contained in:
41666 2023-09-04 01:30:23 -04:00
parent 9ebeeb47f4
commit c58fdf06b7
4 changed files with 4 additions and 4 deletions

View file

@ -17,7 +17,7 @@ lazy_static! {
static ref WS_ADDR: String = env::var("WS_ADDR").unwrap_or_default();
static ref PG: AsyncOnce<sqlx::PgPool> = AsyncOnce::new(async {
let db_url = std::env::var("DATABASE_URL")
.unwrap_or("postgres://saerrouser:saerro321@localhost:5432/data".to_string());
.unwrap_or("postgres://saerrouser:saerro321@127.0.0.1:5432/data".to_string());
PgPoolOptions::new().connect(&db_url).await.unwrap()
});
}