From df578a0930bb802c101da3814dc8caca6e19afd7 Mon Sep 17 00:00:00 2001 From: IsolatedSushi <simen.vanherpt@gmail.com> Date: Wed, 23 Sep 2020 13:31:39 +0200 Subject: [PATCH] Port changes --- envoy.yaml | 4 ++-- frontend/README.md | 2 +- frontend/src/components/gRPCDaprClient.vue | 11 ++++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/envoy.yaml b/envoy.yaml index b813217..473dd13 100644 --- a/envoy.yaml +++ b/envoy.yaml @@ -2,7 +2,7 @@ static_resources: listeners: - name: listener_0 address: - socket_address: { address: 0.0.0.0, port_value: 4949 } + socket_address: { address: 0.0.0.0, port_value: 7050 } filter_chains: - filters: - name: envoy.http_connection_manager @@ -36,4 +36,4 @@ static_resources: type: logical_dns http2_protocol_options: {} lb_policy: round_robin - hosts: [{ socket_address: { address: 192.168.1.34, port_value: 50459 }}] \ No newline at end of file + hosts: [{ socket_address: { address: host.docker.internal, port_value: 50460 }}] \ No newline at end of file diff --git a/frontend/README.md b/frontend/README.md index 3468848..71f8a11 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -9,4 +9,4 @@ For some reason with vue it cant get the dapr.HTTP environment variable (even th -docker run -d -v C:\Users\simen\OneDrive\Documents\GitHub\dummy-vue-grpc\envoy.yaml:/etc/envoy/envoy.yaml:ro -p 4949:4949 -p 50459:50459 envoyproxy/envoy:v1.15.0 \ No newline at end of file +docker run -d -v C:\Users\simen\OneDrive\Documents\GitHub\dummy-vue-grpc\envoy.yaml:/etc/envoy/envoy.yaml:ro -p 7050:7050 -p 50460:50460 envoyproxy/envoy:v1.15.0 \ No newline at end of file diff --git a/frontend/src/components/gRPCDaprClient.vue b/frontend/src/components/gRPCDaprClient.vue index 2ca4f44..32e6644 100644 --- a/frontend/src/components/gRPCDaprClient.vue +++ b/frontend/src/components/gRPCDaprClient.vue @@ -32,6 +32,8 @@ export default { axios.get(dapr_url + "/method/url").then(response=> { + console.log("Response: "); + console.log(response); console.log("Dapr backend running on: " + response.data["ip_address"]+":"+response.data["port"]); } @@ -39,9 +41,9 @@ export default { ); var r = axios.post(dapr_url + "/method/start", 1).then((Response) => { if (Response.data["successful"]) { - console.log("Grpc"); - var connectURL = "http://" + Response.data["url"]; - connectURL = "http://0.0.0.0:4949" + console.log(Response.data); + var connectURL = Response.data["url"]; + connectURL = "http://" + window.location.hostname + ":7050" console.log(connectURL) var client = new ProjectorClient( connectURL, @@ -55,8 +57,7 @@ export default { var stream = client.getProjectionPoints(param); stream.on("data", (response) => { - console.log("response"); - console.log(response); + this.$emit('newPoint', response); }); stream.on("error", (err) => { this.errorAlert = true -- GitLab