Move to git.themmonk.com

This commit is contained in:
the-m-monk
2025-12-29 22:05:31 +10:00
parent b63049e91c
commit f4944ab3b3
24 changed files with 701 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package httpserver
import (
"net/http"
)
func RegisterWebui() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/" {
http.Redirect(w, r, "/web/", http.StatusPermanentRedirect)
return
}
http.NotFound(w, r)
})
fs := http.FileServer(http.Dir("web"))
http.Handle("/web/", http.StripPrefix("/web/", fs))
}