Automatically generate the .env file if it is not there

This commit is contained in:
Achim Rohn
2025-09-17 09:59:02 +02:00
parent fae6653f94
commit 0283634b98
5 changed files with 63 additions and 25 deletions
+2 -9
View File
@@ -12,15 +12,8 @@ func main() {
GlobalI18n = GlobalI18nImplementation{}
environment := env.LoadEnvironment()
db, err := CreatePostgresConnpool(environment.DatabaseUrl)
if err != nil {
Error("Failed to create database connection:", err)
panic(err)
}
defer db.Close()
Debug(environment)
Debug("starting white label app on port 8090")
handler := routes.CreateApi(db)
handler := routes.CreateApi()
log.Fatal(http.ListenAndServe(":8090", handler))
}