HTTP server with WebSockets.
All checks were successful
Linting and tests / Linting (push) Successful in 5s
All checks were successful
Linting and tests / Linting (push) Successful in 5s
This commit is contained in:
@@ -21,6 +21,9 @@ type httpServer struct {
|
||||
logger *slog.Logger
|
||||
db core.Database
|
||||
httpSrv *http.Server
|
||||
httpMux *http.ServeMux
|
||||
|
||||
middlewares []core.HTTPMiddlewareFunc
|
||||
}
|
||||
|
||||
// Initialize initializes service.
|
||||
@@ -67,6 +70,10 @@ func (h *httpServer) Initialize() error {
|
||||
|
||||
h.logger.Info("Initializing...")
|
||||
|
||||
h.middlewares = make([]core.HTTPMiddlewareFunc, 0)
|
||||
|
||||
h.RegisterMiddleware(h.requestLoggingMiddleware)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user