diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-02-24 02:01:24 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-02-24 02:01:24 +0000 |
| commit | 135d8eb1e9612ede642e5341ccd865f72bab3869 (patch) | |
| tree | 57953da718e558506f27286a0f9896f3037d55a1 /internal/api/server.go | |
| parent | f27d4f7ef3949627c9cb1077f90135a5268b7631 (diff) | |
Add embedded web UI and wire it into the HTTP server
Serves a lightweight dashboard (HTML/CSS/JS) from an embedded FS at
GET /. The JS polls the REST API to display tasks and stream logs
via WebSocket. Static files are embedded at build time via web/embed.go.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/api/server.go')
| -rw-r--r-- | internal/api/server.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/api/server.go b/internal/api/server.go index 6caab9f..94095cb 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -11,6 +11,7 @@ import ( "github.com/thepeterstone/claudomator/internal/executor" "github.com/thepeterstone/claudomator/internal/storage" "github.com/thepeterstone/claudomator/internal/task" + webui "github.com/thepeterstone/claudomator/web" "github.com/google/uuid" ) @@ -53,6 +54,7 @@ func (s *Server) routes() { s.mux.HandleFunc("GET /api/executions/{id}", s.handleGetExecution) s.mux.HandleFunc("GET /api/ws", s.handleWebSocket) s.mux.HandleFunc("GET /api/health", s.handleHealth) + s.mux.Handle("GET /", http.FileServerFS(webui.Files)) } // forwardResults listens on the executor pool's result channel and broadcasts via WebSocket. |
