Allow configuring hosts

This commit is contained in:
Ben Sarmiento
2023-11-07 14:14:33 +01:00
parent 1349de7d3f
commit 3cc5044bc5
5 changed files with 19 additions and 64 deletions

View File

@@ -32,7 +32,7 @@ func main() {
mux := http.NewServeMux()
net.Router(mux, config, torrentMgr, cache)
addr := fmt.Sprintf("[::]:%s", config.GetPort())
addr := fmt.Sprintf("%s:%s", config.GetHost(), config.GetPort())
server := &http.Server{Addr: addr, Handler: mux}
shutdown := make(chan os.Signal, 1)