Add support for public static files. Closes #2234

This commit is contained in:
Gabe Kangas
2022-10-27 22:30:39 -07:00
parent d1051a895f
commit ae7c02b421
2 changed files with 34 additions and 0 deletions

View File

@@ -373,6 +373,9 @@ func Start() error {
chat.HandleClientConnection(w, r)
})
// Optional public static files
http.Handle("/public/", http.StripPrefix("/public/", http.FileServer(http.Dir("./public"))))
port := config.WebServerPort
ip := config.WebServerIP