From 166505883a530ba5072327f584c5dd7fefe8d807 Mon Sep 17 00:00:00 2001 From: Daniel Ledda Date: Sat, 14 Nov 2020 01:50:37 +0100 Subject: [PATCH] testing bugs --- climate-server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/climate-server.go b/climate-server.go index 954e21f..4f476cf 100644 --- a/climate-server.go +++ b/climate-server.go @@ -47,7 +47,7 @@ func startServer() { r.HandleFunc("/data", sendData).Methods("GET") r.HandleFunc("/data", sendData).Methods("GET").Queries("since", "") r.HandleFunc("/data/now", createAndSendSnapshot).Methods("GET") - r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir("static/")))) + r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir("webapp/dist/")))) fmt.Printf("Listening on port %s...\n", port) quitSnapshot := make(chan int, 1) go saveSnapshotOnInterval(30, quitSnapshot) @@ -61,7 +61,7 @@ func showCharts(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, "/" + ROOT_URL + "/", 303) } } - http.ServeFile(w, r, "charts.html") + http.ServeFile(w, r, "webapp/dist/charts.html") } func sendData(w http.ResponseWriter, r *http.Request) {