testing bugs

This commit is contained in:
Daniel Ledda
2020-11-14 01:47:17 +01:00
parent 2967fad997
commit 31a871230f

View File

@@ -48,11 +48,10 @@ func startServer() {
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/"))))
http.Handle("/", r)
fmt.Printf("Listening on port %s...\n", port)
quitSnapshot := make(chan int, 1)
go saveSnapshotOnInterval(30, quitSnapshot)
log.Fatal(http.ListenAndServe(":"+port, nil))
log.Fatal(http.ListenAndServe(":"+port, r))
}
func showCharts(w http.ResponseWriter, r *http.Request) {