Pro3.2
This commit is contained in:
parent
16cf27559b
commit
d02e223471
4
main.go
4
main.go
|
|
@ -14,14 +14,14 @@ func serverNameHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
http.Error(w, "No se pudo obtener el nombre del servidor", http.StatusInternalServerError)
|
http.Error(w, "No se pudo obtener el nombre del servidor", http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fmt.Fprintf(w, "v1.2 - Nombre del Servidor: %s \n", serverName)
|
fmt.Fprintf(w, "v2.3 - Nombre del Servidor: %s \n", serverName)
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
http.HandleFunc("/", serverNameHandler)
|
http.HandleFunc("/", serverNameHandler)
|
||||||
|
|
||||||
// Especifica el puerto en el que el servidor escuchará
|
// Especifica el puerto en el que el servidor escuchará
|
||||||
port := "1582"
|
port := "1683"
|
||||||
fmt.Printf("Servidor corriendo en el puerto %s\n", port)
|
fmt.Printf("Servidor corriendo en el puerto %s\n", port)
|
||||||
log.Fatal(http.ListenAndServe(":"+port, nil))
|
log.Fatal(http.ListenAndServe(":"+port, nil))
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue