File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
endpoints/getting-started-grpc Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,29 @@ $ node server.js -p 50051
1313```
1414
1515### Run the client
16+ For running the client locally, you'll need either an API key or a JWT auth token:
17+
18+ #### Using a JWT token (recommended for local development)
19+ You can generate a development-only JWT token using Google Cloud CLI:
20+
21+ ```
22+ $ gcloud auth print-identity-token
23+ ```
24+ See [ print-identity-token] ( https://cloud.google.com/sdk/gcloud/reference/auth/print-identity-token ) for more info.
25+
26+ Then run the client using this token:
1627```
17- $ node client.js -h localhost:50051
28+ $ node client.js -h localhost:50051 -j YOUR_JWT_TOKEN
1829```
1930
31+ #### Using an API key
32+ Alternatively, you can use an API key from your Google Cloud project:
33+ ```
34+ $ node client.js -h localhost:50051 -k YOUR_API_KEY
35+ ```
36+
37+ You can create API keys in the [ Google Cloud Console] ( https://console.cloud.google.com/apis/credentials ) .
38+
2039## Running on Google Cloud Platform
2140### Setup
2241Make sure you have [ gcloud] [ gcloud ] and [ Node.js] [ nodejs ] installed.
You can’t perform that action at this time.
0 commit comments