Skip to content

Commit

Permalink
Added redirect from root to UI
Browse files Browse the repository at this point in the history
  • Loading branch information
shimberger committed Aug 26, 2016
1 parent 02d925b commit 01e14d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ func main() {
if flag.NArg() > 0 {
contentDir = flag.Arg(0)
}

http.Handle("/", http.RedirectHandler("/ui/",302))
http.Handle("/ui/assets/", http.StripPrefix("/ui/", http.FileServer(http.Dir(uiDirectory))))
http.Handle("/ui/", NewDebugHandlerWrapper(http.StripPrefix("/ui/", NewSingleFileServer(indexHtml))))
http.Handle("/list/", NewDebugHandlerWrapper(http.StripPrefix("/list/", NewListHandler(contentDir))))
Expand Down

0 comments on commit 01e14d1

Please sign in to comment.