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

@ -131,7 +131,7 @@ impl Health {
async fn ingest_reachable(&self) -> UpDown {
reqwest::get(
std::env::var("WEBSOCKET_HEALTHCHECK")
.unwrap_or("http://localhost:8999/health".to_string()),
.unwrap_or("http://127.0.0.1:8999/healthz".to_string()),
)
.await
.map(|_| UpDown::Up)

View file

@ -67,7 +67,7 @@ async fn graphiql() -> impl IntoResponse {
#[tokio::main]
async fn main() {
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());
let db = sqlx::PgPool::connect(&db_url).await.unwrap();
let schema = Schema::build(query::Query::default(), EmptyMutation, EmptySubscription)