Listen on all interfaces, this is a demo after all

This commit is contained in:
Josh Grebe 2020-01-25 17:45:44 -05:00
parent c71ce9fc2e
commit 97ccca35f2
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ var upgrader = websocket.Upgrader{
func main() {
http.HandleFunc("/ws/", subscribe)
http.HandleFunc("/", serveIndex)
log.Fatal(http.ListenAndServe("localhost:9888", nil))
log.Fatal(http.ListenAndServe("0.0.0.0:9888", nil))
}
func serveIndex(w http.ResponseWriter, r *http.Request) {
f, err := os.Open("index.html")