package main

import (
	"log"

	"trustcontact/internal/app"
	"trustcontact/internal/config"
)

func main() {
	cfg, err := config.Load()
	if err != nil {
		log.Fatalf("config load failed: %v", err)
	}

	server, err := app.NewApp(cfg)
	if err != nil {
		log.Fatalf("app init failed: %v", err)
	}

	if err := server.Listen(":" + cfg.Port); err != nil {
		log.Fatalf("server listen failed: %v", err)
	}
}
