An example using gRPC-Web with Go and VueJS (Quasar Framework)
The post about this code can be found in my personal blog gustavohenrique.net.
- Install the latest release of Protocol Buffers from here.
- Install the Go protocol buffers plugin running
go get -u github.com/golang/protobuf/protoc-gen-go
. - Install the protoc-gen-grpc-web protoc plugin from here.
protoc -I proto proto/*.proto --proto_path=./proto --go_out=plugins=grpc:./backend/proto
protoc -I proto proto/*.proto --js_out=import_style=commonjs:./frontend/proto --grpc-web_out=import_style=commonjs,mode=grpcwebtext:./frontend/proto
Open a terminal session and run:
cd backend
go run main.go
The backend server will create an in memory SQLite database.
Open another terminal session:
cd frontend
npm i -g @quasar/cli
npm i
quasar dev
MIT