package main import ( "context" "DanceLessonsCoach/pkg/config" "DanceLessonsCoach/pkg/server" "github.com/rs/zerolog/log" ) func main() { // Load configuration (this will also setup logging) cfg, err := config.LoadConfig() if err != nil { log.Fatal().Err(err).Msg("Failed to load configuration") } // Create readiness context to control readiness state readyCtx, readyCancel := context.WithCancel(context.Background()) defer readyCancel() // Create and run server server := server.NewServer(cfg, readyCtx) if err := server.Run(); err != nil { log.Fatal().Err(err).Msg("Server failed") } }