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

Method SetWebUI

internal/server/server.go:2835–2840  ·  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

2833
2834// SetWebUI sets the embedded web UI filesystem for serving the SPA.
2835func (s *Server) SetWebUI(fsys fs.FS) {
2836 s.webFS = fsys
2837 s.webIdentity = identifyWebBuild(fsys)
2838 s.ensureRouter()
2839 s.router.Handle("/*", s.spaHandler())
2840}
2841
2842func (s *Server) spaHandler() http.Handler {
2843 fileServer := http.FileServer(http.FS(s.webFS))

Calls 4

ensureRouterMethod · 0.95
spaHandlerMethod · 0.95
identifyWebBuildFunction · 0.85
HandleMethod · 0.45