Add TypeScript frontend integration documentation, repository agent guidance files, Go-served frontend routing, and an advanced Docker Compose setup with watch mode plus BuildKit cache configuration. Made-with: Cursor
This commit is contained in:
@@ -21,6 +21,8 @@ func NewAPI(svc *app.Service) *API {
|
||||
|
||||
func (a *API) Routes() http.Handler {
|
||||
mux := http.NewServeMux()
|
||||
staticFiles := http.FileServer(http.Dir("web"))
|
||||
|
||||
mux.HandleFunc("GET /healthz", a.health)
|
||||
mux.HandleFunc("POST /v1/auth/challenge", a.createChallenge)
|
||||
mux.HandleFunc("POST /v1/auth/login", a.login)
|
||||
@@ -34,6 +36,9 @@ func (a *API) Routes() http.Handler {
|
||||
mux.HandleFunc("GET /v1/collections/{id}/features", a.listFeatures)
|
||||
mux.HandleFunc("DELETE /v1/features/{id}", a.deleteFeature)
|
||||
|
||||
mux.Handle("/web/", http.StripPrefix("/web/", staticFiles))
|
||||
mux.Handle("/", http.RedirectHandler("/web/", http.StatusTemporaryRedirect))
|
||||
|
||||
return withCORS(mux)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user