File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ type HTTPServer struct {
30
30
func InitAndRun () fx.Option {
31
31
return fx .Module (component ,
32
32
// Init http server
33
- fx .Provide (New ),
33
+ fx .Provide (NewServerWithMiddlewares ),
34
34
fx .Invoke (
35
35
// Registration routes and handlers for http server
36
36
InitHandlerGroups ,
@@ -110,6 +110,7 @@ func AddPrometheus(e *echo.Echo) *echo.Echo {
110
110
// Add prometheus metrics
111
111
e .Use (echoprometheus .NewMiddleware (component ))
112
112
e .GET ("/metrics" , echoprometheus .NewHandler ())
113
+ return e
113
114
}
114
115
115
116
func AddDefaultMiddlewares (e * echo.Echo ) * echo.Echo {
@@ -126,6 +127,7 @@ func AddDefaultMiddlewares(e *echo.Echo) *echo.Echo {
126
127
c .SetRequest (c .Request ().WithContext (ctx ))
127
128
},
128
129
}))
130
+ return e
129
131
}
130
132
131
133
// StartServer is function that registers start of http server in lifecycle
You can’t perform that action at this time.
0 commit comments