From 1ab01ac492fb1585578d6e2afa5b640763277ece Mon Sep 17 00:00:00 2001 From: jabuxas Date: Wed, 18 Sep 2024 10:19:04 -0300 Subject: [PATCH] fix: correct path handling for static on docker, you'd need to do /static and not /app/static --- handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers.go b/handlers.go index 27c0117..9a6db10 100644 --- a/handlers.go +++ b/handlers.go @@ -44,7 +44,7 @@ func (app *Application) indexHandler(w http.ResponseWriter, r *http.Request) { if fileInfo, err := os.Stat(path); err == nil && !fileInfo.IsDir() { http.ServeFile(w, r, path) } else { - http.StripPrefix("/", http.FileServer(http.Dir("static"))).ServeHTTP(w, r) + http.StripPrefix("/", http.FileServer(http.Dir("./static"))).ServeHTTP(w, r) } }