From dcdf8805bcbedee734087f815d2029cc568fb459 Mon Sep 17 00:00:00 2001 From: Kyler Chin <7539174+kylerchin@users.noreply.github.com> Date: Mon, 1 Apr 2024 04:28:18 -0700 Subject: [PATCH] Use database url --- src/birch/server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/birch/server.rs b/src/birch/server.rs index a04e0451..d939e7e1 100644 --- a/src/birch/server.rs +++ b/src/birch/server.rs @@ -378,7 +378,7 @@ async fn main() -> std::io::Result<()> { let sqlx_pool: Arc> = Arc::new(PgPoolOptions::new() .max_connections(5) - .connect("postgres://postgres:welcome@localhost/postgres") + .connect(std::env::var("DATABASE_URL").unwrap().as_str()) .await.unwrap()); // Create a new HTTP server.