We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0992eea commit 3a7fdb1Copy full SHA for 3a7fdb1
src/core/settings/mod.rs
@@ -35,10 +35,12 @@ impl Settings {
35
// These env vars are automatically set by Heroku
36
// DATABASE_URL is also used by SQLx and is required a compile time to check SQL
37
// Just simpler this way...
38
- env::set_var(
39
- "APP_DATABASE__DATABASE_URL",
40
- env!("DATABASE_URL", "DATABASE_URL was not set"),
41
- );
+
+ match env::var("DATABASE_URL") {
+ Ok(database_url) => env::set_var("APP_DATABASE__DATABASE_URL", database_url),
+ Err(_e) => (),
42
+ }
43
44
// Same thing heroku mandates using the port at $PORT
45
match env::var("PORT") {
46
Ok(port) => env::set_var("APP_HTTP__PORT", port),
0 commit comments