refactor(app): migrate server lifecycle to Echo v5

- Add http.Server field to App struct for explicit server management
- Add StartServer() method to create and start HTTP server
- Replace echo.Close() with http.Server.Shutdown() in Shutdown()
- Update import from echo/v4 to echo/v5

Changes:
- New() initializes server field as nil
- StartServer() creates http.Server with Echo as handler
- Shutdown() uses http.Server.Shutdown() with context timeout
- Removed deprecated echo.Close() call (v5 API change)

This provides better control over server lifecycle and graceful shutdown.
This commit is contained in:
2026-03-06 13:59:57 -05:00
parent 687815ce2e
commit abb090ef64
2 changed files with 28 additions and 11 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"testing"
"time"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v5"
"github.com/stretchr/testify/assert"
)