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

fix: total sync and route registration

Browse files
Files changed (1) hide show
  1. main.go +11 -21
main.go CHANGED
@@ -1,26 +1,16 @@
1
  package main
2
-
3
  import (
4
- "log"
5
- "net/http"
6
- "os"
7
  )
8
-
9
  func main() {
10
- // 1. Servir la interfaz HOI4 desde la raíz
11
- http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
12
- http.ServeFile(w, r, "index.html")
13
- })
14
-
15
- // 2. Ejecutar la configuración de rutas original del proxy
16
- // Esto activa /v1, /stats, y los endpoints de keys.go
17
- SetupRoutes()
18
-
19
- port := os.Getenv("PORT")
20
- if port == "" { port = "7860" }
21
-
22
- log.Printf("Servidor ROW-PROXY iniciado en puerto %s", port)
23
- if err := http.ListenAndServe(":" + port, nil); err != nil {
24
- log.Fatal(err)
25
- }
26
  }
 
1
  package main
 
2
  import (
3
+ "log"
4
+ "net/http"
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
  }