HRsniper / grpc-node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gRPC with nodejs

application made in node.js with gRPC server and javascript/typescript.

Install dependencies

npm install

Compiling the protofiles

To compile the .proto files, you need to have protoc installed (it's important to add in your environment variables in the PATH).

npm run compile # in the root directory

Start server

npm run start:server

Start client (in another terminal)

npm run start:client

gRPC web

Install the plugin grpc-web. Rename the executable protoc-gen-grpc-web-VERSION-PLATFORM to protoc-gen-grpc-web. (it's important to add in your environment variables in the PATH).

Compile gRPC web

npm run compile:grpc_web

With the webpack and webpack-cli dependency installed

npm run bundle

Start the server gRPC: npm run start:server.

Then start an HTTP server of your choice (ex.: php -S localhost:8080) in the web folder.

About


Languages

Language:JavaScript 91.1%Language:TypeScript 7.9%Language:HTML 1.0%