Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @chatie/grpc with all npm packages installed. Try it out:

var grpc = require("@chatie/grpc")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@chatie/grpc v0.2.4

gRPC for Chatie

GRPC

Greenkeeper badge

chatie grpc

gRPC for Chatie

INSTALL

npm install

Install Protocol Buffer

https://github.com/google/protobuf/releases/latest

Mac

brew install protoc

Linux

sudo apt install protobuf-compiler

GENERATE STUBS

npm run generate

1. JS for Protocol Buffer

protoc \
  --js_out="import_style=commonjs,binary:${OUT_DIR}"

https://github.com/google/protobuf/releases/latest

2. JS for gRPC Stubs

protoc \
  --plugin="protoc-gen-grpc=`which grpc_tools_node_protoc_plugin`" \
  --grpc_out="${OUT_DIR}"

https://www.npmjs.com/package/grpc-tools

3. TypeScript Typing Definations for Protocol Buffer & gRPC Stubs

protoc \
  --plugin="protoc-gen-grpc=node_modules/grpc_tools_node_protoc_ts/bin/protoc-gen-ts" \
  --grpc_out="${OUT_DIR}"

https://github.com/agreatfool/grpc_tools_node_protoc_ts

4. JS & TS for gRPC Web

protoc \
  --plugin="protoc-gen-ts=node_modules/ts-protoc-gen/bin/protoc-gen-ts" \
  --ts_out="service=true:${OUT_DIR}"

https://github.com/improbable-eng/ts-protoc-gen

RESOURCES

Protocol Buffer

gRPC Web

TypeScript Generator

Zoo Keeper

STUN

TCP hole punching

AUTHOR

Huan LI <zixia@zixia.net>

profile for zixia on Stack Exchange, a network of free, community-driven Q&A sites

COPYRIGHT & LICENSE

  • Code & Docs © 2016-2018 Huan LI <zixia@zixia.net>
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free