From 85a582b83426edd50aa323b8aba6056a3e43e5eb Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 26 Jan 2020 16:02:01 -0700 Subject: [PATCH] make it build --- build.sh | 2 +- cmd/dendrite-monolith-server/main.go | 8 ++++---- go.mod | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 326b9e6ab..a33326f15 100755 --- a/build.sh +++ b/build.sh @@ -1,3 +1,3 @@ #!/bin/sh -GOOS=js GOARCH=wasm GOBIN=$PWD/`dirname $0`/bin go build -v $PWD/`dirname $0`/cmd/dendrite-monolith-server +GOOS=js GOARCH=wasm GOBIN=$PWD/`dirname $0`/bin go build -v -o bin/dendrite.wasm $PWD/`dirname $0`/cmd/dendrite-monolith-server diff --git a/cmd/dendrite-monolith-server/main.go b/cmd/dendrite-monolith-server/main.go index dc8fcbd18..39ee9852e 100644 --- a/cmd/dendrite-monolith-server/main.go +++ b/cmd/dendrite-monolith-server/main.go @@ -88,11 +88,11 @@ func main() { // }() // Expose the matrix APIs via libp2p-js - if base.P2PLocalNode != nil { + if base.P2pLocalNode != nil { go func() { - logrus.Info("Listening on libp2p-js host ID ", base.P2PLocalNode.Id) + logrus.Info("Listening on libp2p-js host ID ", base.P2pLocalNode.Id) - listener := go_http_js_libp2p.NewP2pListener(base.P2PLocalNode) + listener := go_http_js_libp2p.NewP2pListener(base.P2pLocalNode) defer listener.Close() s := &http.Server{} s.Serve(listener) @@ -104,7 +104,7 @@ func main() { listener := go_http_js_libp2p.NewFetchListener() s := &http.Server{} go s.Serve(listener) - } + }() } // Handle HTTPS if certificate and key are provided diff --git a/go.mod b/go.mod index 688e7c049..8d42845c9 100644 --- a/go.mod +++ b/go.mod @@ -42,4 +42,6 @@ require ( replace github.com/matrix-org/go-http-js-libp2p v0.0.0-20200125063821-6eb06b102bda => ../go-http-js-libp2p +replace github.com/matrix-org/gomatrixserverlib v0.0.0-20200124100636-0c2ec91d1df5 => ../gomatrixserverlib + go 1.13