Skip to content
gRPC-Web with Go and VueJS (Quasar Framework)
Go Other
  1. Go 98.8%
  2. Other 1.2%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
backend First commit Feb 10, 2020
frontend First commit Feb 10, 2020
proto First commit Feb 10, 2020
README.md First commit Feb 10, 2020

README.md

grpc-web-golang-vuejs

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.

Setup

  1. Install the latest release of Protocol Buffers from here.
  2. Install the Go protocol buffers plugin running go get -u github.com/golang/protobuf/protoc-gen-go.
  3. Install the protoc-gen-grpc-web protoc plugin from here.

Running

Compile the protobuf definitions

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

Backend

Open a terminal session and run:

cd backend
go run main.go

The backend server will create an in memory SQLite database.

Frontend

Open another terminal session:

cd frontend
npm i -g @quasar/cli
npm i
quasar dev

License

MIT

You can’t perform that action at this time.