diff --git a/cmd/dendrite-p2p-demo/main.go b/cmd/dendrite-p2p-demo/main.go index aeb136921..29810d444 100644 --- a/cmd/dendrite-p2p-demo/main.go +++ b/cmd/dendrite-p2p-demo/main.go @@ -47,6 +47,7 @@ import ( func main() { instanceName := flag.String("name", "dendrite-p2p", "the name of this P2P demo instance") + instancePort := flag.Int("port", 8080, "the port that the client API will listen on") flag.Parse() filename := fmt.Sprintf("%s-private.key", *instanceName) @@ -124,7 +125,7 @@ func main() { // Expose the matrix APIs directly rather than putting them under a /api path. go func() { - httpBindAddr := ":8080" + httpBindAddr := fmt.Sprintf(":%d", *instancePort) logrus.Info("Listening on ", httpBindAddr) logrus.Fatal(http.ListenAndServe(httpBindAddr, nil)) }()