Switch to go:embed

This commit is contained in:
Unrud 2022-02-21 22:30:16 +01:00
parent 7fc46bf38c
commit 41c3e0b10d
8 changed files with 21 additions and 396 deletions

View file

@ -205,7 +205,7 @@ func main() {
}
port := addr.Port
mux := http.NewServeMux()
mux.Handle("/", http.FileServer(assetFS()))
mux.Handle("/", http.FileServer(http.FS(webdata)))
mux.Handle("/ws", websocket.Handler(func(ws *websocket.Conn) {
var message string
challenge := <-authenticationChallenges