From 4f839107b956f96c9d0b6a14e00e32428c657beb Mon Sep 17 00:00:00 2001 From: Nick Law Date: Wed, 10 Jun 2020 03:08:39 +1000 Subject: [PATCH] chore(docs): fix incorrect proto path in helloworld tutorial (#368) This change reverts #366. The `proto/` directory, as described in the guide, is created under the root of the crate. Not under `src/`. I've also included a fix to the `grpcurl` endpoint. --- examples/helloworld-tutorial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/helloworld-tutorial.md b/examples/helloworld-tutorial.md index 1a5a379..443bea1 100644 --- a/examples/helloworld-tutorial.md +++ b/examples/helloworld-tutorial.md @@ -129,7 +129,7 @@ At the root of your crate, create a `build.rs` file and add the following code: ```rust fn main() -> Result<(), Box> { - tonic_build::compile_protos("src/proto/helloworld.proto")?; + tonic_build::compile_protos("proto/helloworld.proto")?; Ok(()) } ``` @@ -244,7 +244,7 @@ If have a gRPC GUI client such as [Bloom RPC] you should be able to send request Or if you use [grpcurl] then you can simply try send requests like this: ``` -$ grpcurl -plaintext -import-path ./proto -proto helloworld.proto -d '{"name": "Tonic"}' localhost:50051 helloworld.Greeter/SayHello +$ grpcurl -plaintext -import-path ./proto -proto helloworld.proto -d '{"name": "Tonic"}' [::]:50051 helloworld.Greeter/SayHello ``` And receiving responses like this: ```