Moge-Row commited on
Commit
0206104
1 Parent(s): 46ab268

CRITICAL FIX: Reverse compilation and logic restoration

Browse files
Files changed (1) hide show
  1. main.go +7 -12
main.go CHANGED
@@ -6,27 +6,22 @@ import (
6
  "os"
7
  )
8
 
9
- // Declaramos las funciones para que el compilador no llore
10
  func main() {
11
- // 1. Servir el index.html (Interfaz HOI4)
12
  http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
13
  http.ServeFile(w, r, "index.html")
14
  })
15
 
16
- // 2. Intentar inicializar las rutas del proxy
17
- // Si tus archivos usan SetupRoutes o InitRoutes, Go lo encontrar谩 al compilar el paquete
18
- go func() {
19
- defer func() { recover() }()
20
- // Intentamos las dos variantes m谩s comunes
21
- // InitRoutes()
22
- // SetupRoutes()
23
- }()
24
 
25
  port := os.Getenv("PORT")
26
  if port == "" { port = "7860" }
27
 
28
- log.Printf("Servidor operativo en puerto %s", port)
29
  if err := http.ListenAndServe(":" + port, nil); err != nil {
30
  log.Fatal(err)
31
  }
32
- }
 
6
  "os"
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:34:25 -04