Public Repository

Last pushed: a month ago
Short Description
Demo application for GopherJS gRPC-Web bindings
Full Description

GopherJS over Improbable gRPC-Web to Go gRPC backend


<a href="https://cloud.docker.com/swarm/jfbrandhorst/repository/docker/jfbrandhorst/grpcweb-example/general" alt="Docker cloud repo">
<img src="https://www.docker.com/sites/default/files/mono_horizontal_large.png" height="18"/>
</a>

An example implementation of a
GopherJS React
client talking to a Go gRPC server using the Improbable gRPC-Web implementation and
the wsproxy
through the
protoc-gen-gopherjs
bindings generator.

A demo of this application can be found on
https://grpcweb.jbrandhorst.com.

Developing

To run the server on https://localhost:10000:

$ go run main.go

If you want to make any changes to the client, you'll need to install GopherJS:

$ go get -u github.com/gopherjs/gopherjs

Then you'll need to also install some vendored generators:

$ go install \
    ./vendor/github.com/golang/protobuf/protoc-gen-go \
    ./vendor/github.com/jteeuwen/go-bindata/go-bindata \
    ./vendor/github.com/johanbrandhorst/protobuf/protoc-gen-gopherjs \
    ./vendor/myitcv.io/react/cmd/reactGen \
    ./vendor/myitcv.io/immutable/cmd/immutableGen

After that, any changes you make to the proto file in ./proto/ or the JS client code
in ./client/ should be followed by

$ make regenerate

You may need to generate the client code twice as the first time will run reactGen and
immutableGen which might be necessary for the subsequent gopherjs build to work.

Docker Pull Command
Owner
jfbrandhorst