From 7472e2384e758a3cff02703459f066681098ba82 Mon Sep 17 00:00:00 2001 From: Stefan Etringer Date: Tue, 24 Jun 2025 14:43:32 +0000 Subject: [PATCH] added template files to be included in the binary --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 6d8b259..958885c 100644 --- a/main.go +++ b/main.go @@ -40,7 +40,8 @@ var ( //go:embed static/* var staticFiles embed.FS - +//go:embed templates +var templateFiles embed.FS type Config struct { Database struct { @@ -404,6 +405,7 @@ func main() { webMux.HandleFunc("/logs", logsHandler) webMux.HandleFunc("/logs/{level}", logsHandler) webMux.Handle("/static/", http.FileServer(http.FS(staticFiles))) + webMux.Handle("/templates/", http.FileServer(http.FS(templateFiles))) webMux.HandleFunc("/proxyAgent", proxyAgentHandler) // db := database.InitDB (cfg.Database.Username, cfg.Database.Password, cfg.Database.Host, cfg.Database.Port, cfg.Database.Name)