feat: initial commit

This commit is contained in:
2025-03-31 16:17:35 +01:00
commit 6719f8a61a
91 changed files with 7119 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
package main
import (
"log"
"github.com/FernandoVideira/LK_API_Temp/internal/db"
"github.com/FernandoVideira/LK_API_Temp/internal/env"
"github.com/FernandoVideira/LK_API_Temp/internal/store"
)
func main() {
addr := env.GetString("DB_ADDR", "postgres://postgres:postgres@localhost:5432/lk_tmpl?sslmode=disable")
conn, err := db.New(addr, 3, 3, env.GetDuration("DB_MAX_IDLE_TIME", "5m"))
if err != nil {
log.Fatalf("could not connect to db: %v", err)
}
defer conn.Close()
store := store.NewStorage(conn)
db.Seed(store, conn)
}