diff --git a/climate-server.go b/climate-server.go index 954e21f..4f476cf 100644 --- a/climate-server.go +++ b/climate-server.go @@ -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) {