default route support

This commit is contained in:
mappu 2016-10-08 15:19:58 +13:00
parent 45e0cb4424
commit 6ff0805b1b

View File

@ -183,6 +183,9 @@ func (this *App) ConfigRequestHandler(w http.ResponseWriter, r *http.Request) {
func (this *App) StaticRequestHandler(w http.ResponseWriter, r *http.Request) {
fileName := r.URL.Path[1:]
if fileName == "" {
fileName = "index.htm"
}
data, err := Asset(fileName)
if err != nil {