first commit

This commit is contained in:
orohi
2026-06-17 04:28:17 +03:00
commit 8c21b62a4f
15 changed files with 965 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
package main
import (
"context"
"log"
"os"
"os/signal"
"syscall"
"github.com/panelhosting/panel/internal/config"
"github.com/panelhosting/panel/internal/database"
)
func main() {
cfg, err := config.Load()
if err != nil {
log.Fatal(err)
}
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
pool, err := database.NewPool(ctx, cfg.DatabaseURL)
if err != nil {
log.Fatal(err)
}
defer pool.Close()
log.Println("panel database ready (API coming soon)")
<-ctx.Done()
}