Skip to content

Commit

Permalink
(fix) use configured host to start web server
Browse files Browse the repository at this point in the history
  • Loading branch information
leonjza committed Sep 16, 2024
1 parent dddad31 commit b89df9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ func (s *Server) Run() {
// the spa
r.Handle("/*", SpaHandler())

log.Info("starting web server", "port", s.Port)
if err := http.ListenAndServe(":"+strconv.Itoa(s.Port), r); err != nil {
log.Info("starting web server", "host", s.Host, "port", s.Port)
if err := http.ListenAndServe(s.Host+":"+strconv.Itoa(s.Port), r); err != nil {
log.Error("server listen error", "err", err)
}
}

0 comments on commit b89df9c

Please sign in to comment.