From c60ed18507fd88201748ab1d2ee5db96785550c7 Mon Sep 17 00:00:00 2001 From: Daniel Ledda Date: Sat, 7 Nov 2020 01:28:42 +0100 Subject: [PATCH] Changed endpoints and db queries, chart now shows suggested mins and maxes --- climate-server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/climate-server.go b/climate-server.go index 27d8bab..8ac1a94 100644 --- a/climate-server.go +++ b/climate-server.go @@ -41,7 +41,7 @@ func startServer() { r.HandleFunc("/data/since/{mins}", sendData).Methods("GET") r.HandleFunc("/data/last/", sendLastSnapshot).Methods("GET") r.HandleFunc("/", saveSnapshot).Methods("POST") - r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir(ROOT_URL + "static/")))) + r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir("/" + ROOT_URL + "static/")))) http.Handle("/", r) fmt.Printf("Listening on port %s...\n", port) log.Fatal(http.ListenAndServe(":"+port, nil))