Files
skillshare/internal/server/embed_dev.go
T
Willie 092fb14f8a feat: add web dashboard with embedded React SPA (skillshare ui)
Single-binary web UI for visual skill management — React 19 + Vite
frontend embedded via go:embed, Go net/http REST API backend (30+
endpoints). Includes dashboard, skills browser, targets, sync, collect,
search, install, config editor, backup/restore, and git sync pages.

Also adds Bitbucket/GitLab URL parsing for install, git operations
library, skill version checking, CI frontend build steps, Docker
sandbox support, and website docs for the ui command.
2026-02-08 05:08:30 +08:00

25 lines
674 B
Go

//go:build dev
package server
import (
"net/http"
)
// spaHandler returns a placeholder handler when building with -tags dev.
// In dev mode, use the Vite dev server on :5173 instead.
func spaHandler() http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.Write([]byte(`<!DOCTYPE html>
<html>
<head><title>Skillshare UI (dev)</title></head>
<body>
<h1>Skillshare UI — Dev Mode</h1>
<p>The frontend is served by Vite at <a href="http://localhost:5173">localhost:5173</a>.</p>
<p>Or run <code>make ui-build</code> to embed the built frontend.</p>
</body>
</html>`))
})
}