From 06022f40be7928e16166747276ec8dcacca3bab1 Mon Sep 17 00:00:00 2001 From: Dri0m Date: Mon, 11 Sep 2023 00:17:59 +0300 Subject: [PATCH] stuff --- backend/main.go | 8 +++++++- static/index.html | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/backend/main.go b/backend/main.go index 6e7f52f..28be491 100644 --- a/backend/main.go +++ b/backend/main.go @@ -115,6 +115,7 @@ func main() { // static fileserver http.HandleFunc("/", rootHandler) + http.HandleFunc("/faq", faqHandler) fs := http.FileServer(http.Dir("../static")) http.Handle("/static/", http.StripPrefix("/static", fs)) @@ -133,7 +134,12 @@ func main() { func rootHandler(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "../static/index.html") - log.Debug().Msg("served root") + log.Debug().Msg("served /") +} + +func faqHandler(w http.ResponseWriter, r *http.Request) { + http.ServeFile(w, r, "../static/faq/index.html") + log.Debug().Msg("served /faq") } // Return JSON-formatted info about a specific or random entry diff --git a/static/index.html b/static/index.html index 9b18363..0e83431 100644 --- a/static/index.html +++ b/static/index.html @@ -13,8 +13,8 @@