Copy over environment.go and generate .env file in starter

This commit is contained in:
Achim Rohn
2025-09-03 00:32:45 +02:00
parent 5f0a1872a5
commit 7c41bd3d35
5 changed files with 118 additions and 99 deletions
+4 -4
View File
@@ -2,6 +2,7 @@ package main
import (
. "ersteller-lib"
"ersteller-lib/starter/env"
"log"
"net/http"
)
@@ -10,10 +11,9 @@ func main() {
GlobalI18n = GlobalI18nImplementation{}
server := NewHtmxServer()
// Path to the SQLite database
dbPath := "db/sqlite.db"
// Create database connection
db, err := CreateSQLiteConnpool(dbPath)
environment := env.LoadEnvironment()
db, err := CreatePostgresConnpool(environment.DatabaseUrl)
if err != nil {
Error("Failed to create database connection:", err)
panic(err)