From 47e05d60c3bb0d46e9cbe709db4aa29d679cf8c6 Mon Sep 17 00:00:00 2001 From: Daniel Ledda Date: Wed, 4 Nov 2020 23:55:11 +0100 Subject: [PATCH] added visualisation --- climate-server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/climate-server.go b/climate-server.go index a732f0f..c9dfa51 100644 --- a/climate-server.go +++ b/climate-server.go @@ -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) {