From 0019a4a0951bbf960a28fc4fc18a2d413c2bce78 Mon Sep 17 00:00:00 2001 From: David Folch Agulles Date: Wed, 26 Nov 2025 17:49:08 +0100 Subject: [PATCH] Remove unused DB_TYPE configuration variable --- .env.example | 1 - README.md | 5 ++--- internal/infrastructure/config/config.go | 5 ----- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.env.example b/.env.example index f1c28c9..e10d458 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,3 @@ -DB_TYPE=sqlite DB_PATH=./data/apocapoc.db PORT=8080 diff --git a/README.md b/README.md index d723306..7ddf670 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Self-hosted habit tracking service with a clean, hexagonal architecture. - **Carry-over support**: Choose if incomplete habits persist or expire - **Full history tracking**: Complete audit trail of all interactions - **Charts & Analytics**: Heatmaps, line charts, and statistics -- **Self-hosted first**: Easy deployment with SQLite or PostgreSQL +- **Self-hosted first**: Easy deployment with SQLite ## Quick Start @@ -24,7 +24,6 @@ services: ports: - "8080:8080" environment: - - DB_TYPE=sqlite - DB_PATH=/data/apocapoc.db - JWT_SECRET=YOUR_SECRET_HERE - JWT_EXPIRY=24h @@ -69,7 +68,7 @@ The API will be available at `http://localhost:8080` ### Prerequisites - Go 1.23+ -- SQLite (or PostgreSQL) +- SQLite ### Running locally diff --git a/internal/infrastructure/config/config.go b/internal/infrastructure/config/config.go index fbd0aac..a156dd0 100644 --- a/internal/infrastructure/config/config.go +++ b/internal/infrastructure/config/config.go @@ -8,7 +8,6 @@ import ( ) type Config struct { - DBType string DBPath string Port string Host string @@ -23,7 +22,6 @@ func Load() (*Config, error) { godotenv.Load() cfg := &Config{ - DBType: os.Getenv("DB_TYPE"), DBPath: os.Getenv("DB_PATH"), Port: getEnvOrDefault("PORT", "8080"), Host: getEnvOrDefault("HOST", "0.0.0.0"), @@ -34,9 +32,6 @@ func Load() (*Config, error) { DefaultTimezone: os.Getenv("DEFAULT_TIMEZONE"), } - if cfg.DBType == "" { - return nil, fmt.Errorf("DB_TYPE is required") - } if cfg.DBPath == "" { return nil, fmt.Errorf("DB_PATH is required") }