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()), )), }) }