add initial application structure with configuration, logging, and health check endpoints
This commit is contained in:
@@ -8,10 +8,13 @@ import (
|
||||
type RouteParams struct {
|
||||
fx.In
|
||||
|
||||
Echo *echo.Echo
|
||||
Health *HealthController
|
||||
Echo *echo.Echo
|
||||
Hero *HeroController
|
||||
}
|
||||
|
||||
func RegisterRoutes(p RouteParams) {
|
||||
p.Echo.GET("/health", p.Health.Health)
|
||||
p.Echo.POST("/heroes", p.Hero.Create)
|
||||
p.Echo.GET("/heroes/:id", p.Hero.GetByID)
|
||||
p.Echo.PUT("/heroes/:id", p.Hero.Update)
|
||||
p.Echo.DELETE("/heroes/:id", p.Hero.Delete)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user