Cleaned up project structure more and simplified the app installation

This commit is contained in:
2025-12-20 05:41:48 -08:00
parent ca767df960
commit 4cb8b94445
5 changed files with 95 additions and 29 deletions

View File

@@ -143,11 +143,13 @@ func tmp(w http.ResponseWriter, r *http.Request) {
}
func Start() {
addr := ":1234"
r := chi.NewRouter()
r.Use(middleware.Logger)
r.Get("/static/style.css", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "./static/style.css")
})
r.Get("/history", tmp)
http.ListenAndServe(":1234", r)
fmt.Printf("WebUI starting on %s\n", addr)
http.ListenAndServe(addr, r)
}