Git Product home page Git Product logo

grpc-web-poc's Introduction

gRPC-Web-PoC

This is a small proof of concept project based on grpc and grpc-web Improbables implementation, demostrating how any language based grpc server and a TypeScript frontend could work together.

Needed dependencies

You must have installed on your system:

  • node Most of the project dependencies and running scripts are managed though node and its ecosystem, also the final server code is written in node.

  • go >= 1.8 Go language is used to deploy a grpc-web spec compatible proxy server.

  • protoc The protocol buffer compiler is needed since the TypeScript message and services definitions are generated on frontend compilation step out of proto files. For the server we are not using it, relying on a runtime generation based on Protobuf.js (this dependency is managed through npm, so you don't have to worry about it).

Get started (with HTTP1.1)

  • npm install This command will install all needed dependencies to run the three components of the project (server, proxy and client).

  • npm start This will start the node grpc server, a grpc-web proxy based on go, and a webpack dev server for the TypeScript client.

  • Go to http://localhost:8081 and check the browser console.

Using HTTP2

HTTP2 requires TLS. This repository contains certificates in the misc/cert directory. You can optionally generate your own replacements using the gen_cert.sh in the same directory.

Follow this guide to accept the certificates in Chrome/Chromium.

  • npm run start:tls will start the node grpc server, proxy and specific TLS enabled webpack dev server using the certificates from misc/cert.

  • Go to https://localhost:8082 and check the browser console.


Source

Original projects which this project is based on can be found on:

https://github.com/improbable-eng/grpc-web

https://github.com/grpc/grpc/tree/master/src/node

grpc-web-poc's People

Contributors

calvellido avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.