edge/pkg/http/client.go

23 lines
492 B
Go
Raw Permalink Normal View History

2023-02-09 12:16:36 +01:00
package http
import (
"net/http"
"forge.cadoles.com/arcad/edge/pkg/sdk"
)
func (h *Handler) handleSDKClient(w http.ResponseWriter, r *http.Request) {
serveFile(w, r, &sdk.FS, "client/dist/client.js")
}
func (h *Handler) handleSDKClientMap(w http.ResponseWriter, r *http.Request) {
serveFile(w, r, &sdk.FS, "client/dist/client.js.map")
}
func (h *Handler) handleAppFiles(w http.ResponseWriter, r *http.Request) {
h.mutex.RLock()
defer h.mutex.RUnlock()
h.public.ServeHTTP(w, r)
}