testing bugs

This commit is contained in:
Daniel Ledda
2020-11-14 01:50:37 +01:00
parent a0182ebd1e
commit 166505883a

View File

@@ -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) {