An open API service indexing awesome lists of open source software.

https://github.com/paulhendricks/grpc-examples


https://github.com/paulhendricks/grpc-examples

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# grpc-examples

Build the gRPC image from the Dockerfile:

```bash
docker build -t grpc .
```

Run the server:

```bash
docker run -it --rm -d -u $(id -u):$(id -g) -v $PWD:$PWD -w $PWD grpc python3 helloworld/greeter_server.py
```

Use the `` that was printed to the screen and run the client:

```bash
docker exec python3 helloworld/greeter_client.py
```

Use the following to re-compile the Python protobuff code if necessary:

```bash
docker run -d -u $(id -u):$(id -g) -v $PWD:$PWD -w $PWD grpc \
python3 -m grpc_tools.protoc -I . \
--python_out=helloworld --grpc_python_out=helloworld helloworld.proto
```