This commit is contained in:
2025-07-19 17:54:34 -04:00
commit 18df90b20d
21 changed files with 535 additions and 0 deletions

24
internal/server/routes.go Normal file
View File

@@ -0,0 +1,24 @@
package server
import (
"net/http"
)
func (srv *server) routes() http.Handler {
mux := http.NewServeMux()
fileServer := http.FileServer(http.Dir("./ui/static/"))
mux.Handle("GET /static/", http.StripPrefix("/static", fileServer))
//mux.Handle("GET /static/", http.FileServerFS(ui.Files))
//Configure Middleware chains
//Add routes and handlers to map
routes := map[string]http.Handler{}
for path, handler := range routes {
mux.Handle(path, handler)
}
return mux
}