mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 20:03:10 -06:00
Add -port for dendrite-p2p-demo
This commit is contained in:
parent
1d673f3b62
commit
2b0d1a7317
|
|
@ -47,6 +47,7 @@ import (
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
instanceName := flag.String("name", "dendrite-p2p", "the name of this P2P demo instance")
|
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()
|
flag.Parse()
|
||||||
|
|
||||||
filename := fmt.Sprintf("%s-private.key", *instanceName)
|
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.
|
// Expose the matrix APIs directly rather than putting them under a /api path.
|
||||||
go func() {
|
go func() {
|
||||||
httpBindAddr := ":8080"
|
httpBindAddr := fmt.Sprintf(":%d", *instancePort)
|
||||||
logrus.Info("Listening on ", httpBindAddr)
|
logrus.Info("Listening on ", httpBindAddr)
|
||||||
logrus.Fatal(http.ListenAndServe(httpBindAddr, nil))
|
logrus.Fatal(http.ListenAndServe(httpBindAddr, nil))
|
||||||
}()
|
}()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue