added visualisation

This commit is contained in:
Daniel Ledda
2020-11-05 00:06:24 +01:00
parent 2c6ad9e7d1
commit ae4fad1627
4 changed files with 1 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ func startServer() {
r.HandleFunc("/", showCharts).Methods("GET") r.HandleFunc("/", showCharts).Methods("GET")
r.HandleFunc("/data/", sendData).Methods("GET") r.HandleFunc("/data/", sendData).Methods("GET")
r.HandleFunc("/", saveSnapshot).Methods("POST") r.HandleFunc("/", saveSnapshot).Methods("POST")
r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir("static/"))))
http.Handle("/", r) http.Handle("/", r)
fmt.Printf("Listening on port %s...\n", port) fmt.Printf("Listening on port %s...\n", port)
log.Fatal(http.ListenAndServe(":"+port, nil)) log.Fatal(http.ListenAndServe(":"+port, nil))