aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/node
diff options
context:
space:
mode:
authorGravatar Stanley Cheung <stanleycheung@google.com>2015-08-27 14:38:38 -0700
committerGravatar Stanley Cheung <stanleycheung@google.com>2015-08-27 14:38:38 -0700
commit0a268216c2c8e112351b7ed038da04bf50b9eb5a (patch)
treeab93176dac0836e46df5f2b6f54c5a4fba66c823 /examples/node
parent20fa6693f3836bf1418176ec78b26feaf51a369d (diff)
replace all grpc-common occurances with examples
Diffstat (limited to 'examples/node')
-rw-r--r--examples/node/README.md6
-rw-r--r--examples/node/route_guide/README.md18
2 files changed, 12 insertions, 12 deletions
diff --git a/examples/node/README.md b/examples/node/README.md
index 8c24a960a3..045fe51ede 100644
--- a/examples/node/README.md
+++ b/examples/node/README.md
@@ -18,13 +18,13 @@ INSTALL
- Clone this repository
```sh
- $ git clone https://github.com/grpc/grpc-common.git
+ $ git clone https://github.com/grpc/grpc.git
```
- Install this package's dependencies
```sh
- $ cd grpc-common/node
+ $ cd examples/node
$ npm install
```
@@ -57,4 +57,4 @@ You can find a more detailed tutorial in [gRPC Basics: Node.js][]
[homebrew]:http://brew.sh
[linuxbrew]:https://github.com/Homebrew/linuxbrew#installation
[gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install
-[gRPC Basics: Node.js]:https://github.com/grpc/grpc-common/blob/master/node/route_guide/README.md
+[gRPC Basics: Node.js]:https://github.com/grpc/grpc/blob/master/examples/node/route_guide/README.md
diff --git a/examples/node/route_guide/README.md b/examples/node/route_guide/README.md
index 5460c9905d..2efc5a5da5 100644
--- a/examples/node/route_guide/README.md
+++ b/examples/node/route_guide/README.md
@@ -5,7 +5,7 @@ This tutorial provides a basic Node.js programmer's introduction to working with
- Define a service in a .proto file.
- Use the Node.js gRPC API to write a simple client and server for your service.
-It assumes that you have read the [Getting started](https://github.com/grpc/grpc-common) guide and are familiar with [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). Note that the example in this tutorial uses the proto3 version of the protocol buffers language, which is currently in alpha release:you can find out more in the [proto3 language guide](https://developers.google.com/protocol-buffers/docs/proto3) and see the [release notes](https://github.com/google/protobuf/releases) for the new version in the protocol buffers Github repository.
+It assumes that you have read the [Getting started](https://github.com/grpc/grpc/tree/master/examples) guide and are familiar with [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). Note that the example in this tutorial uses the proto3 version of the protocol buffers language, which is currently in alpha release:you can find out more in the [proto3 language guide](https://developers.google.com/protocol-buffers/docs/proto3) and see the [release notes](https://github.com/google/protobuf/releases) for the new version in the protocol buffers Github repository.
This isn't a comprehensive guide to using gRPC in Node.js: more reference documentation is coming soon.
@@ -17,22 +17,22 @@ With gRPC we can define our service once in a .proto file and implement clients
## Example code and setup
-The example code for our tutorial is in [grpc/grpc-common/node/route_guide](https://github.com/grpc/grpc-common/tree/master/node/route_guide). To download the example, clone the `grpc-common` repository by running the following command:
+The example code for our tutorial is in [examples/node/route_guide](examples/node/route_guide). To download the example, clone this repository by running the following command:
```shell
-$ git clone https://github.com/grpc/grpc-common.git
+$ git clone https://github.com/grpc/grpc.git
```
-Then change your current directory to `grpc-common/node/route_guide`:
+Then change your current directory to `examples/node/route_guide`:
```shell
-$ cd grpc-common/node/route_guide
+$ cd examples/node/route_guide
```
-You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Node.js quick start guide](https://github.com/grpc/grpc-common/tree/master/node).
+You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Node.js quick start guide](examples/node).
## Defining the service
-Our first step (as you'll know from [Getting started](https://github.com/grpc/grpc-common)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`grpc-common/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/protos/route_guide.proto).
+Our first step (as you'll know from [Getting started](https://github.com/grpc/grpc/tree/master/examples)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`examples/protos/route_guide.proto`](examples/protos/route_guide.proto).
To define a service, you specify a named `service` in your .proto file:
@@ -110,7 +110,7 @@ There are two parts to making our `RouteGuide` service do its job:
- Implementing the service interface generated from our service definition: doing the actual "work" of our service.
- Running a gRPC server to listen for requests from clients and return the service responses.
-You can find our example `RouteGuide` server in [grpc-common/node/route_guide/route_guide_server.js](https://github.com/grpc/grpc-common/blob/master/node/route_guide/route_guide_server.js). Let's take a closer look at how it works.
+You can find our example `RouteGuide` server in [examples/node/route_guide/route_guide_server.js](examples/node/route_guide/route_guide_server.js). Let's take a closer look at how it works.
### Implementing RouteGuide
@@ -244,7 +244,7 @@ As you can see, we build and start our server with the following steps:
<a name="client"></a>
## Creating the client
-In this section, we'll look at creating a Node.js client for our `RouteGuide` service. You can see our complete example client code in [grpc-common/node/route_guide/route_guide_client.js](https://github.com/grpc/grpc-common/blob/master/node/route_guide/route_guide_client.js).
+In this section, we'll look at creating a Node.js client for our `RouteGuide` service. You can see our complete example client code in [examples/node/route_guide/route_guide_client.js](examples/node/route_guide/route_guide_client.js).
### Creating a stub