Skip to content

Commit

Permalink
fix: host
Browse files Browse the repository at this point in the history
  • Loading branch information
leleboys committed Nov 22, 2024
1 parent c98ce06 commit 63a9ef2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ func main() {

router.SetRouter(server, buildFS)
var port = os.Getenv("PORT")
var host = os.Getenv("HOST", "localhost")
var host = os.Getenv("HOST")
if host == "" {
host = "localhost"
}
if port == "" {
port = strconv.Itoa(*common.Port)
}
Expand Down

0 comments on commit 63a9ef2

Please sign in to comment.