hello gordon, good to see you
All checks were successful
/ test (push) Successful in 14s

This commit is contained in:
Serge Bazanski 2026-02-14 19:13:55 +01:00
parent bd33434cf2
commit a971fd1828
4 changed files with 24 additions and 1 deletions

View file

@ -1,7 +1,7 @@
package main
import (
_ "embed"
"embed"
"fmt"
"html/template"
"net/http"
@ -283,9 +283,13 @@ func (s *webServer) viewButtonVent(w http.ResponseWriter, r *http.Request) {
s.d.ventPress()
}
//go:embed static/*
var static embed.FS
func (s *webServer) setupViews() {
http.HandleFunc("/", s.viewIndex)
http.HandleFunc("/favicon.png", s.viewFavicon)
http.Handle("/static/", http.FileServer(http.FS(static)))
http.HandleFunc("/stream", s.viewStream)
http.HandleFunc("/metrics", s.viewMetrics)
http.HandleFunc("/button/vent", s.viewButtonVent)