http-boot-server/bootserver/controllers/ui/static.go
Melora Hugues ca59f1e25f
All checks were successful
continuous-integration/drone/push Build is passing
add first version of the UI
2023-08-16 23:33:26 +02:00

15 lines
280 B
Go

package ui
import (
"net/http"
)
const StaticRoute = "/static/"
type StaticController struct {
}
func (sc *StaticController) ServeHTTP(w http.ResponseWriter, r *http.Request) {
fs := http.FileServer(http.Dir("./static"))
http.StripPrefix(StaticRoute, fs).ServeHTTP(w, r)
}