Skip to content

Commit 996f6bf

Browse files
committed
added dapr run commands across other docs
Signed-off-by: Hannah Hunter <[email protected]>
1 parent aa5945d commit 996f6bf

File tree

4 files changed

+88
-6
lines changed

4 files changed

+88
-6
lines changed

daprdocs/content/en/js-sdk-docs/js-client/_index.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,25 @@ By default, the example will run using HTTP. To use gRPC:
4848
const client = new DaprClient(daprHost, process.env.DAPR_HTTP_PORT, CommunicationProtocolEnum.GRPC);
4949
```
5050

51-
- Instead of `dapr run --app-protocol http`, run `dapr run --app-protocol grpc`.
51+
- Instead of running:
52+
53+
```bash
54+
# HTTP using dapr run
55+
dapr run --app-id example-config --app-port 50051 --app-protocol http npm run start
56+
57+
# or npm script
58+
npm run start:dapr-http
59+
```
60+
61+
Run:
62+
63+
```bash
64+
# gRPC using dapr run
65+
dapr run --app-id example-config --app-port 50051 --app-protocol grpc npm run start
66+
67+
# or npm script
68+
npm run start:dapr-grpc
69+
```
5270

5371
{{% /alert %}}
5472

examples/configuration/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,22 @@ By default, the example will run using HTTP. To use gRPC:
2828
const client = new DaprClient(daprHost, process.env.DAPR_HTTP_PORT, CommunicationProtocolEnum.GRPC);
2929
```
3030

31-
- Instead of `dapr run --app-protocol http`, run `dapr run --app-protocol grpc`.
31+
- Instead of running:
32+
33+
```bash
34+
# using dapr run
35+
dapr run --app-id example-config --app-port 50051 --app-protocol http npm run start
36+
37+
# or npm script
38+
npm run start:dapr-http
39+
```
40+
41+
Run:
42+
43+
```bash
44+
# using dapr run
45+
dapr run --app-id example-config --app-port 50051 --app-protocol grpc npm run start
46+
47+
# or npm script
48+
npm run start:dapr-grpc
49+
```

examples/invocation/README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,28 @@ npm run start:dapr-http
2222

2323
By default, the example will run using HTTP. To use gRPC:
2424

25-
- Add `CommunicationProtocolEnum.GRPC` to the DaprClient object creation.
26-
- Instead of `dapr run --app-protocol http`, run `dapr run --app-protocol grpc`
25+
- Add `CommunicationProtocolEnum.GRPC` to the DaprClient object creation. For example:
26+
27+
```javascript
28+
const client = new DaprClient(daprHost, process.env.DAPR_HTTP_PORT, CommunicationProtocolEnum.GRPC);
29+
```
30+
31+
- Instead of running:
32+
33+
```bash
34+
# using dapr run
35+
dapr run --app-id example-invocation --app-port 50051 --app-protocol http npm run start
36+
37+
# or npm script
38+
npm run start:dapr-http
39+
```
40+
41+
Run:
42+
43+
```bash
44+
# using dapr run
45+
dapr run --app-id example-invocation --app-port 50051 --app-protocol grpc npm run start
46+
47+
# or npm script
48+
npm run start:dapr-grpc
49+
```

examples/pubsub/README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,28 @@ npm run start:dapr-http
2929

3030
By default, the example will run using HTTP. To use gRPC:
3131

32-
- Add `CommunicationProtocolEnum.GRPC` to the DaprClient object creation.
33-
- Instead of `dapr run --app-protocol http`, run `dapr run --app-protocol grpc`
32+
- Add `CommunicationProtocolEnum.GRPC` to the DaprClient object creation. For example:
33+
34+
```javascript
35+
const client = new DaprClient(daprHost, process.env.DAPR_HTTP_PORT, CommunicationProtocolEnum.GRPC);
36+
```
37+
38+
- Instead of running:
39+
40+
```bash
41+
# using dapr run
42+
dapr run --app-id example-pubsub --app-port 50051 --app-protocol http --components-path ./components npm run start
43+
44+
# or npm script
45+
npm run start:dapr-http
46+
```
47+
48+
Run:
49+
50+
```bash
51+
# using dapr run
52+
dapr run --app-id example-pubsub --app-port 50051 --app-protocol grpc --components-path ./components npm run start
53+
54+
# or npm script
55+
npm run start:dapr-grpc
56+
```

0 commit comments

Comments
 (0)