MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / SetWebUI

Method SetWebUI

internal/server/server.go:1659–1663  ·  view source on GitHub ↗

SetWebUI sets the embedded web UI filesystem for serving the SPA.

(fsys fs.FS)

Source from the content-addressed store, hash-verified

1657
1658// SetWebUI sets the embedded web UI filesystem for serving the SPA.
1659func (s *Server) SetWebUI(fsys fs.FS) {
1660 s.webFS = fsys
1661 s.ensureRouter()
1662 s.router.Handle("/*", s.spaHandler())
1663}
1664
1665func (s *Server) spaHandler() http.Handler {
1666 fileServer := http.FileServer(http.FS(s.webFS))

Callers 1

serveCmdFunction · 0.80

Calls 3

ensureRouterMethod · 0.95
spaHandlerMethod · 0.95
HandleMethod · 0.80

Tested by

no test coverage detected