Moge-Row commited on
Commit
9f63d98
·
1 Parent(s): e7671d7

FIX: Emergency restoration of proxy logic and routes

Browse files
Files changed (1) hide show
  1. main.go +6 -1
main.go CHANGED
@@ -5,12 +5,17 @@ import (
5
  "os"
6
  )
7
  func main() {
 
8
  http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
9
  http.ServeFile(w, r, "index.html")
10
  })
11
- // Inicia las rutas definidas en keys.go, index.go, etc.
 
 
12
  SetupRoutes()
 
13
  port := os.Getenv("PORT")
14
  if port == "" { port = "7860" }
 
15
  log.Fatal(http.ListenAndServe(":" + port, nil))
16
  }
 
5
  "os"
6
  )
7
  func main() {
8
+ // Servir la interfaz visual
9
  http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
10
  http.ServeFile(w, r, "index.html")
11
  })
12
+
13
+ // IMPORTANTE: Aquí es donde el servidor activa las funciones de tus otros archivos
14
+ // Si tu función de inicio en keys.go o index.go tiene otro nombre, cámbialo aquí.
15
  SetupRoutes()
16
+
17
  port := os.Getenv("PORT")
18
  if port == "" { port = "7860" }
19
+ log.Printf("Servidor reiniciado en puerto %s", port)
20
  log.Fatal(http.ListenAndServe(":" + port, nil))
21
  }