Skip to content

Commit

Permalink
chore(docs): fix incorrect proto path in helloworld tutorial (#368)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nicklaw5 authored Jun 9, 2020
1 parent 02499fd commit 4f83910
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/helloworld-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn std::error::Error>> {
tonic_build::compile_protos("src/proto/helloworld.proto")?;
tonic_build::compile_protos("proto/helloworld.proto")?;
Ok(())
}
```
Expand Down Expand Up @@ -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:
```
Expand Down

0 comments on commit 4f83910

Please sign in to comment.