fix: load .env in server startup

This commit is contained in:
2026-04-20 17:51:25 +02:00
parent 0d0401865d
commit dd06ad3483
3 changed files with 6 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ import (
"syscall"
"time"
"github.com/joho/godotenv"
_ "github.com/mattn/go-sqlite3"
"mal/api/auth"
@@ -23,6 +24,8 @@ import (
)
func main() {
_ = godotenv.Load()
db, err := sql.Open("sqlite3", fmt.Sprintf("file:%s?_foreign_keys=on", dbFile()))
if err != nil {
log.Fatalf("failed to open db: %v", err)