envoy
!This project allows for the use of Google's gRPC-web
npm
package without implicitly requiring that one also use envoy
alongside it.
Standalone CLI tools for the most part.
As for your package manager, obviously this all depends on OS.
for Mac developers, just useHomebrew
for everything.
for Linux devs, you can easily useapt
&npm
together to get all necessary CLI tools and packages.
for Windows devs
...just admitbatch
andPowerShell
are doo-doo and install WSL2
GETTING STARTED
This is the barebones installation process which I went through to configure my application environment correctly.
MacOS via Homebrew
$ brew install protobuf
$ brew install protoc-gen-grpc-web
Windows WITH WSL / MSYS2
and
LINUX (Tested: Debian 11.3)
the
-g
tag is used liberally here in order to do our best to guarantee that the package executable will end up referenced within the user $PATH variable.
$ npm install protoc-gen-grpc-web -g
(does this have to be Global or not?) $ npm install google-protobuf -g
$ npm install grpc-web -g
Go
Packages$ go get -u google.golang.org/grpc
$ go get -u github.com/golang/protobuf/protoc-gen-go
protobuf
$ 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
DEPLOYMENT
here we discuss how to deploy the webserver frontend via npm
, as well as the Golang
based backend.
required npm
packages & minimum versions
(alongside Sveltekit
obviously)
example of FRONTEND deployment, with an output folder named as specified and utilized in the previous sections.
$ cd frontend
$ npm install
$ npm run dev
Backend setup is very easy, but somewhat limited in functionality at the moment.
$ cd backend
$ go run server.go