Added stat methods and anomaly detection algorithm

This commit is contained in:
2025-06-19 12:09:23 +02:00
parent 2db2c57ce2
commit ca4b75af7a
5 changed files with 230 additions and 10 deletions

View File

@@ -52,6 +52,10 @@ func main() {
controller.GetMoon(res, req, &cache.MoonCache, &vars)
})
http.HandleFunc("/stats/", func(res http.ResponseWriter, req *http.Request) {
controller.GetStatistics(res, req, statDB)
})
listenAddr := fmt.Sprintf(":%s", port)
log.Printf("Server listening on %s", listenAddr)
http.ListenAndServe(listenAddr, nil)