aboutsummaryrefslogtreecommitdiff
path: root/cmd/app/serve/serve.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/app/serve/serve.go')
-rw-r--r--cmd/app/serve/serve.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/app/serve/serve.go b/cmd/app/serve/serve.go
index dcc296b..0609083 100644
--- a/cmd/app/serve/serve.go
+++ b/cmd/app/serve/serve.go
@@ -25,12 +25,14 @@ func Run(c *cli.Context) error {
e := echo.New()
+ e.HTTPErrorHandler = handler.ErrorHandler
+
e.Use(middleware.Recover())
e.Use(middleware.Logger())
e.GET("/", h.Index)
- e.GET("/random", h.Random)
e.GET("/quote/:id", h.Quote)
+ e.GET("/random", h.Random)
e.GET("/add", h.AddQuote)
e.POST("/add", h.AddQuotePost)
e.GET("/add/success", h.AddQuoteSuccess)