X-Git-Url: http://git.scottworley.com/reliable-chat/blobdiff_plain/e3e35bbed2617705f4db1c90e5e986f7e54c18da..270d2ae5829e1d66dcc1a0fb78ba3c2e3c3c22de:/server/server.go?ds=inline diff --git a/server/server.go b/server/server.go index 574d2e1..adbbf84 100644 --- a/server/server.go +++ b/server/server.go @@ -27,6 +27,7 @@ import "strconv" import "time" var port = flag.Int("port", 21059, "Port to listen on") +var localaddress = flag.String("localaddress", "", "Local address to bind to") var frame_count = expvar.NewInt("frame_count") var speak_count = expvar.NewInt("speak_count") @@ -203,7 +204,7 @@ func start_server(store Store) { w.Write([]byte(robots_txt)); }) - log.Fatal(http.ListenAndServe(":"+strconv.Itoa(*port), nil)) + log.Fatal(http.ListenAndServe(*localaddress+":"+strconv.Itoa(*port), nil)) } func main() {