Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
acoshift committed Aug 4, 2018
1 parent 306ef48 commit 3594bce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ func main() {
"index": "/",
}).
BeforeRender(addHeaderRender).
Handler(router(app)).
Handler(router()).
GracefulShutdown().
Address(":8080").
ListenAndServe()
}

func router(app *hime.App) http.Handler {
func router() http.Handler {
mux := http.NewServeMux()
mux.Handle(app.Route("index"), hime.Handler(indexHandler))
mux.Handle("/", hime.Handler(indexHandler))
return middleware.Chain(
logRequestMethod,
logRequestURI,
Expand Down Expand Up @@ -168,7 +168,7 @@ func main() {
"index": "/",
}).
BeforeRender(addHeaderRender).
Handler(router(app))
Handler(router())

http.ListenAndServe(":8080", app)
}
Expand Down

0 comments on commit 3594bce

Please sign in to comment.