Spaces:
Paused
Paused
FORCE REBUILD: Eliminando referencias rotas
Browse files
main.go
CHANGED
|
@@ -7,19 +7,18 @@ import (
|
|
| 7 |
)
|
| 8 |
|
| 9 |
func main() {
|
| 10 |
-
// Servir
|
| 11 |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
| 12 |
http.ServeFile(w, r, "index.html")
|
| 13 |
})
|
| 14 |
|
| 15 |
-
//
|
| 16 |
-
//
|
| 17 |
-
// al iniciarse el paquete main.
|
| 18 |
|
| 19 |
port := os.Getenv("PORT")
|
| 20 |
if port == "" { port = "7860" }
|
| 21 |
|
| 22 |
-
log.Printf("
|
| 23 |
if err := http.ListenAndServe(":"+port, nil); err != nil {
|
| 24 |
log.Fatal(err)
|
| 25 |
}
|
|
|
|
| 7 |
)
|
| 8 |
|
| 9 |
func main() {
|
| 10 |
+
// Servir tu index.html de HOI4
|
| 11 |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
| 12 |
http.ServeFile(w, r, "index.html")
|
| 13 |
})
|
| 14 |
|
| 15 |
+
// Dejamos que los otros archivos (keys.go, etc)
|
| 16 |
+
// registren sus propias rutas automáticamente.
|
|
|
|
| 17 |
|
| 18 |
port := os.Getenv("PORT")
|
| 19 |
if port == "" { port = "7860" }
|
| 20 |
|
| 21 |
+
log.Printf("Reiniciando sistema en puerto %s", port)
|
| 22 |
if err := http.ListenAndServe(":"+port, nil); err != nil {
|
| 23 |
log.Fatal(err)
|
| 24 |
}
|