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 useHomebrewfor everything.
for Linux devs, you can easily useapt&npmtogether to get all necessary CLI tools and packages.
for Windows devs
...just admitbatchandPowerShellare doo-doo and install WSL2
GETTING STARTEDThis 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-webWindows WITH WSL / MSYS2
and
LINUX (Tested: Debian 11.3)
the
-gtag 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 -gGo Packages$ go get -u google.golang.org/grpc$ go get -u github.com/golang/protobuf/protoc-gen-goprotobuf$ 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/protoDEPLOYMENThere 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