From 1b1a191551b10b99b1138861d9c0676a906dcb52 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Thu, 21 Nov 2024 19:30:11 -0800 Subject: [PATCH] Static path --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 33df984..4b3b2bf 100644 --- a/main.go +++ b/main.go @@ -7,11 +7,11 @@ import ( ) func main() { - http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, "Hello! you've requested %s\n", r.URL.Path) - }) +// http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { +// fmt.Fprintf(w, "Hello! you've requested %s\n", r.URL.Path) +// }) - http.Handle("/static", http.FileServer(http.Dir("./static"))) + http.Handle("/", http.FileServer(http.Dir("./static"))) port := os.Getenv("PORT") if port == "" {