From 790bb6fbb590b4e7791ceee446a1e852a753d72c Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Mon, 4 May 2026 21:06:51 +0200 Subject: [PATCH] fix: read BASE_URL from env for RSS channel link --- .env.example | 1 + crates/presentation/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 547faf0..46226ad 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ DATABASE_URL=sqlite:./dev.db +BASE_URL=http://localhost:3000 PORT=3000 JWT_SECRET= JWT_TTL_SECONDS= diff --git a/crates/presentation/src/main.rs b/crates/presentation/src/main.rs index 442acef..ecce9fb 100644 --- a/crates/presentation/src/main.rs +++ b/crates/presentation/src/main.rs @@ -109,7 +109,7 @@ async fn wire_dependencies() -> anyhow::Result { app_ctx, html_renderer: Arc::new(AskamaHtmlRenderer::new()), rss_renderer: Arc::new(RssAdapter::new( - "http://localhost:3000".into(), + std::env::var("BASE_URL").unwrap_or_else(|_| "http://localhost:3000".into()), )), }) }