From 2b0d1a7317e846f3d6aee8a9ce09ff7b9e3a14eb Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 8 Apr 2020 17:00:50 +0100 Subject: [PATCH] Add -port for dendrite-p2p-demo --- cmd/dendrite-p2p-demo/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) }()