Skip to content

Commit 6bed652

Browse files
author
Zachary Seguin
authored
fix: Return index.html page at the root
1 parent e8a39d8 commit 6bed652

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@ func main() {
236236
},
237237
}, s.GetPodDefaults)).Methods("GET")
238238

239+
// Return the index.html page.
240+
router.Path("/").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
241+
http.ServeFile(w, r, path.Join(staticDirectory, "index.html"))
242+
})
243+
239244
// Return the index.html page when a request for the new page is received directly.
240245
router.Path("/new").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
241246
http.ServeFile(w, r, path.Join(staticDirectory, "index.html"))

0 commit comments

Comments
 (0)