var port = flag.Int("port", 21059, "Port to listen on")
+var frame_count = expvar.NewInt("frame_count")
var speak_count = expvar.NewInt("speak_count")
var fetch_count = expvar.NewInt("fetch_count")
var fetch_wait_count = expvar.NewInt("fetch_wait_count")
return
}
w.Header().Add("Content-Type", "application/json")
+ w.Header().Add("Access-Control-Allow-Origin", "*")
w.Write(json_encoded)
})
})
http.HandleFunc("/frame", func(w http.ResponseWriter, r *http.Request) {
+ frame_count.Add(1)
w.Write([]byte(frame_html));
})
}
func main() {
+ flag.Parse()
store := start_store()
start_server(store)
}