package main

import (
	"actatempus_backend/internal/infrastructure/persistence/config"
	"actatempus_backend/internal/interfaces/http"
	"fmt"
	"log"
)

func main() {
	// Lese die Konfiguration ein
	cfg, err := config.LoadConfig(".")
	if err != nil {
		log.Fatalf("could not load config: %v", err)
	}

	// Starte den HTTP-Server
	server := http.NewServer(cfg)
	fmt.Println("Starting ActaTempus server on port 8080...")
	if err := server.Start(); err != nil {
		log.Fatalf("server failed to start: %v", err)
	}
}
