testing bugs
This commit is contained in:
@@ -47,7 +47,7 @@ func startServer() {
|
|||||||
r.HandleFunc("/data", sendData).Methods("GET")
|
r.HandleFunc("/data", sendData).Methods("GET")
|
||||||
r.HandleFunc("/data", sendData).Methods("GET").Queries("since", "")
|
r.HandleFunc("/data", sendData).Methods("GET").Queries("since", "")
|
||||||
r.HandleFunc("/data/now", createAndSendSnapshot).Methods("GET")
|
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)
|
fmt.Printf("Listening on port %s...\n", port)
|
||||||
quitSnapshot := make(chan int, 1)
|
quitSnapshot := make(chan int, 1)
|
||||||
go saveSnapshotOnInterval(30, quitSnapshot)
|
go saveSnapshotOnInterval(30, quitSnapshot)
|
||||||
@@ -61,7 +61,7 @@ func showCharts(w http.ResponseWriter, r *http.Request) {
|
|||||||
http.Redirect(w, r, "/" + ROOT_URL + "/", 303)
|
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) {
|
func sendData(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
Reference in New Issue
Block a user