add login page to webserver

This commit is contained in:
2026-07-31 12:45:43 -07:00
parent e8b422e390
commit e53631a65b
4 changed files with 78 additions and 1 deletions
+7
View File
@@ -5,8 +5,15 @@ import (
"net/http"
)
var routes []string
func ServeLoginPage(route string) {
ServeWebpage(route, loginHandler)
}
func ServeWebpage(url string, handler func(http.ResponseWriter, *http.Request)) {
http.HandleFunc(url, handler)
routes = append(routes, url)
}
func ServeWebserver() {