aboutsummaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/config.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/config/config.go b/config/config.go
index 9bd673e..5bb9cb4 100644
--- a/config/config.go
+++ b/config/config.go
@@ -8,6 +8,8 @@ import (
"net/url"
"os"
"strconv"
+
+ "github.com/miniflux/miniflux/logger"
)
const (
@@ -89,7 +91,16 @@ func (c *Config) BasePath() string {
// DatabaseURL returns the database URL.
func (c *Config) DatabaseURL() string {
- return c.get("DATABASE_URL", defaultDatabaseURL)
+ value, exists := os.LookupEnv("DATABASE_URL")
+ if !exists {
+ logger.Info("The environment variable DATABASE_URL is not configured (the default value is used instead)")
+ }
+
+ if value == "" {
+ value = defaultDatabaseURL
+ }
+
+ return value
}
// DatabaseMaxConnections returns the number of maximum database connections.