fix static bug and load main page
All checks were successful
Build Process Supervisor / build (amd64, .exe, windows) (push) Successful in 2m32s
Build Process Supervisor / build (amd64, , linux) (push) Successful in 2m41s
Build Process Supervisor / build (arm, 6, , linux) (push) Successful in 2m35s
Build Process Supervisor / build (arm64, , linux) (push) Successful in 2m31s

This commit is contained in:
Adrian Zürcher
2025-08-05 20:09:28 +02:00
parent e1ba6e49a8
commit e188813adf
3 changed files with 19 additions and 12 deletions

View File

@@ -4,6 +4,7 @@ import (
"embed"
"flag"
"fmt"
"io/fs"
"log"
"net/http"
"processSupervisor/handlers"
@@ -28,7 +29,12 @@ func main() {
panic(err)
}
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.FS(staticFS))))
staticSub, err := fs.Sub(staticFS, "static")
if err != nil {
log.Fatal(err)
}
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.FS(staticSub))))
http.HandleFunc("/taskmanager/htop", htop.UpdateHTop)
http.HandleFunc("/", mainPage.UpdateMainPage)