container for the excellent https://github.com/improbable-eng/grpc-web/tree/master/go/grpcwebproxy
3.6K
This project contains two things
Before starting, the signalbroker must be running. Follow the instruction to get going, preferrable the docker guide.
$ git clone [email protected]:beamylabs/signalbroker-web-client.git
$ cd signalbroker-web-client
SIGNALBROKER_IP=192.168.1.169 docker-compose -f docker-compose-grpcwebproxy.yml up
Make sure to use your real host ip (not 127.0.0.1) instead of 192.168.1.169
quick test, the mini web sample should now work if you follow the instructions Websocket Web Client found below
Now point your browser to http://your_ip:8080/, read more below Run the gRPC front-end web client
SIGNALBROKER_IP=172.16.14.133 docker-compose -f docker-compose-envoy.yml up
Point your browser to http://your_envoy_machine_ip:8080/. You will be notified that the Signal Broker proxy is offline. This is because you need to specify the correct IP according to your configurations. Click the red field in the status bar at the bottom which reads "Signal Broker proxy". Configure it by setting your proxy (envoy or grpcwebproxy) IP, http://[your_envoy_or_grpcwebproxy_server]:8081 at first attemp probabaly 127.0.0.1:8081. Then hit the refresh button in the webpage.
Before starting, the signalbroker must be running.
SignalServer is reached via a grpc proxy (envoy or grpcwebproxy). If the SignalServer grpc api is changed the corresponding js files need to be re-generated read more here
SIGNALBROKER_IP=192.168.1.169 docker-compose -f docker-compose-grpcwebproxy.yml start proxy
cd clientSource && yarn serve
Read more in the development section.
mix deps.get
iex -S mix
if your signalbroker server is running on another machine do:
mix deps.get
SIGNAL_SERVER_HOST_NAME=10.251.177.205 iex -S mix
Envoy must be running and should be connected to the Signal Broker Server. Check readme on how to get started.
See configuration/grpc_web/README.md
for information on generation of GRPC-web JS code from the proto-files.
See clientSource/README.md for more information about the web frontend.
The resulting production build can be hosted on a web server of your choice or
you may prefer to use the development server by running yarn serve. If you
intend to host the production version on Cowboy, then copy the generated
/dist folder to signalbroker-web-client/priv/ after running yarn build.
Remember to point the web frontend to the correct proxy (envoy or grpcwebproxy)
IP.
The gRPC front-end web client for the Signal Broker is in active development and would appreciate your feature suggestions or bug reports. File them as issues in this repository :)
Easier to get started, but less capable option and predecesor to the gRPC client.
To access the Websocket client UI point your web browser to http://localhost:8080/websocket_demo/web_car.html
The API is simply the same as the telnet API but sent over websocket.
For a working sample of how to use the code go to
priv/websocket_demo/js/web_car.js.
add envoy to the docker image, alternatively use docker compose.
use grpcwebproxy since it works with arm
Content type
Image
Digest
Size
9.4 MB
Last updated
over 4 years ago
docker pull aleksandarf/grpcwebrproxy