Moge-Row commited on
Commit
488456f
1 Parent(s): c97035c

FIX: Reverting broken main.go and restoring core proxy routes

Browse files
Files changed (1) hide show
  1. main.go +11 -8
main.go CHANGED
@@ -7,21 +7,24 @@ import (
7
  )
8
 
9
  func main() {
10
- // 1. SERVIR INTERFAZ HOI4 (Punto de entrada visual)
11
  http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
12
  http.ServeFile(w, r, "index.html")
13
  })
14
 
15
- // 2. COMPILAR AL INVERSA (Restaurar l贸gica del Proxy)
16
- // Llamamos a la funci贸n que conecta keys.go y anthropic.go
17
- // En tu estructura, esto suele estar bajo Setup() o RegisterRoutes()
18
- Setup()
19
 
 
20
  port := os.Getenv("PORT")
21
  if port == "" { port = "7860" }
22
 
23
- log.Printf("Servidor RE-ESTABLECIDO en puerto %s", port)
24
- if err := http.ListenAndServe(":" + port, nil); err != nil {
 
 
25
  log.Fatal(err)
26
  }
27
- }// BUILD REF: dom 19 abr 2026 22:35:24 -04
 
7
  )
8
 
9
  func main() {
10
+ // 1. Prioridad: Servir tu Interfaz de HOI4 (Frente Oriental)
11
  http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
12
  http.ServeFile(w, r, "index.html")
13
  })
14
 
15
+ // 2. RECUPERACI脫N DE LA L脫GICA ORIGINAL:
16
+ // Invocamos el router principal del proxy que ya maneja /stats, /v1, etc.
17
+ // En tu c贸digo, esto se hace llamando a la funci贸n que configura el ServeMux por defecto.
18
+ SetupRoutes()
19
 
20
+ // 3. Configuraci贸n del puerto para Hugging Face
21
  port := os.Getenv("PORT")
22
  if port == "" { port = "7860" }
23
 
24
+ log.Printf("Servidor RESTAURADO en puerto %s", port)
25
+
26
+ // Usamos nil para que use el DefaultServeMux donde SetupRoutes registr贸 todo
27
+ if err := http.ListenAndServe(":"+port, nil); err != nil {
28
  log.Fatal(err)
29
  }
30
+ }// Restore Point: dom 19 abr 2026 22:37:17 -04