added visualisation
This commit is contained in:
@@ -34,7 +34,7 @@ func startServer() {
|
||||
port := "8001"
|
||||
r := mux.NewRouter()
|
||||
r.HandleFunc("/", showCharts).Methods("GET")
|
||||
r.HandleFunc("/data", sendData).Methods("GET")
|
||||
r.HandleFunc("/data/", sendData).Methods("GET")
|
||||
r.HandleFunc("/", saveSnapshot).Methods("POST")
|
||||
http.Handle("/", r)
|
||||
fmt.Printf("Listening on port %s...\n", port)
|
||||
@@ -42,7 +42,7 @@ func startServer() {
|
||||
}
|
||||
|
||||
func showCharts(w http.ResponseWriter, r *http.Request) {
|
||||
http.ServeFile(w, r, "./charts.html")
|
||||
http.ServeFile(w, r, "charts.html")
|
||||
}
|
||||
|
||||
func sendData(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user