Get Addr, ReadTimeout and WriteTimeout from the config
This commit is contained in:
@@ -30,7 +30,10 @@ func (s *Server) setup() error {
|
||||
|
||||
mux.HandleFunc("/health", s.handleHealth)
|
||||
s.httpServer = &http.Server{
|
||||
Addr: s.cfg.Server.BindAddress,
|
||||
Handler: mux,
|
||||
ReadTimeout: s.cfg.Server.ReadTimeout,
|
||||
WriteTimeout: s.cfg.Server.WriteTimeout,
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user