Skip to content

vertx-howtos/grpc-web-howto

Repository files navigation

Building a gRPC Web service

Build Status

This document will show you how to build a gRPC Web service with Vert.x.

What you will build

You will build a gRPC Greeter client/server application, using the gRPC Web protocol.

On the server side, you will implement a Vert.x gRPC server service that:

  • implements a gRPC server stub

  • configures an HTTP server replying to both gRPC Web and static file requests

On the client side, you will create a browser page that uses the gRPC Web Javascript client.

What you need

  • A text editor or an IDE

  • Java 17 or higher

Create the project

gRPC service definition

The gRPC Greeter service consists in a single SayHello rpc method. The HelloRequest message contains the name sent by the client. The HelloReply message contains the greeting generated by the server.