File tree Expand file tree Collapse file tree 4 files changed +88
-6
lines changed
daprdocs/content/en/js-sdk-docs/js-client Expand file tree Collapse file tree 4 files changed +88
-6
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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+ ```
Original file line number Diff line number Diff line change @@ -22,5 +22,28 @@ npm run start:dapr-http
2222
2323By 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+ ```
Original file line number Diff line number Diff line change @@ -29,5 +29,28 @@ npm run start:dapr-http
2929
3030By 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+ ```
You can’t perform that action at this time.
0 commit comments