From ae2f98aafcfcf41ecfebb3106d2e179aad8e5227 Mon Sep 17 00:00:00 2001 From: 0ceanSlim Date: Wed, 31 Jul 2024 15:54:42 -0400 Subject: [PATCH] fix unchanged web-> app directories --- .gitignore | 2 +- app/app.go | 4 ++-- main.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index e58ef36..5976ef3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ config.yml relay_metadata.json grain.exe -/release \ No newline at end of file +/build \ No newline at end of file diff --git a/app/app.go b/app/app.go index 3a54b2c..f5a3999 100644 --- a/app/app.go +++ b/app/app.go @@ -37,8 +37,8 @@ func RootHandler(w http.ResponseWriter, r *http.Request) { // Define the base directories for views and templates const ( - viewsDir = "web/views/" - templatesDir = "web/views/templates/" + viewsDir = "app/views/" + templatesDir = "app/views/templates/" ) // Define the common layout templates filenames diff --git a/main.go b/main.go index be599df..2ed4274 100644 --- a/main.go +++ b/main.go @@ -47,9 +47,9 @@ func main() { func setupRoutes() *http.ServeMux { mux := http.NewServeMux() mux.HandleFunc("/", ListenAndServe) - mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("web/static")))) + mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("app/static")))) mux.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) { - http.ServeFile(w, r, "web/static/img/favicon.ico") + http.ServeFile(w, r, "app/static/img/favicon.ico") }) return mux }