package main

import (
	"customServer/internal/network"
	"fmt"
	"log"
)

func main() {
	// The state manager initializes itself via init() in internal/state

	// 1. HTTP Server for REST API (Port 8080)
	go func() {
		if err := network.StartHTTPServer(":8080"); err != nil {
			log.Fatalf("HTTP server failed: %v", err)
		}
	}()

	// 2. TCP Server for Scalable Server (Port 3000) with SSL
	fmt.Println("[Main] Starting TCP Server...")
	if err := network.StartTCPServer(":3000"); err != nil {
		log.Fatalf("TCP server failed: %v", err)
	}
}
