diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-07-28 16:01:40 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-07-28 16:02:19 +0900 |
| commit | d24c19963f8d0d17d6db93b418cc9d644693c868 (patch) | |
| tree | 45acd2d0ddd3b54c11de9a2e20b62e18c7ba48fc /backend/main.go | |
| parent | c953b0496ef205ddda0defd70f376623bf13db61 (diff) | |
| download | iosdc-japan-2025-albatross-d24c19963f8d0d17d6db93b418cc9d644693c868.tar.gz iosdc-japan-2025-albatross-d24c19963f8d0d17d6db93b418cc9d644693c868.tar.zst iosdc-japan-2025-albatross-d24c19963f8d0d17d6db93b418cc9d644693c868.zip | |
feat(backend): user Logger and Recover middleware
Diffstat (limited to 'backend/main.go')
| -rw-r--r-- | backend/main.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/main.go b/backend/main.go index 1ea1fd1..1787e3c 100644 --- a/backend/main.go +++ b/backend/main.go @@ -10,6 +10,7 @@ import ( "github.com/jackc/pgx/v5" "github.com/labstack/echo/v4" + "github.com/labstack/echo/v4/middleware" oapimiddleware "github.com/oapi-codegen/echo-middleware" "github.com/nsfisis/iosdc-2024-albatross-backend/api" @@ -144,6 +145,9 @@ func main() { e := echo.New() + e.Use(middleware.Logger()) + e.Use(middleware.Recover()) + { apiGroup := e.Group("/api") apiGroup.Use(oapimiddleware.OapiRequestValidator(openApiSpec)) |
