Skip to content

Commit d753aae

Browse files
Merge pull request #121 from dolencd/master
Add basic Invocation and PubSub example
2 parents 8613b49 + 1120096 commit d753aae

File tree

11 files changed

+1324
-0
lines changed

11 files changed

+1324
-0
lines changed

examples/invocation/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Examples - Invocation
2+
3+
This example demonstrates how to use the Invocation API.
4+
5+
## Run
6+
7+
```bash
8+
# If it is not already, initialize DAPR on the system
9+
dapr init
10+
11+
# Install dependenies
12+
npm install
13+
14+
# Run the example
15+
npm run start:dapr-http
16+
```
17+
18+
## Switching to gRPC
19+
20+
By default the example will run using HTTP. To use gRPC, do the following:
21+
* Replace both occurences of `process.env.DAPR_HTTP_PORT` with `process.env.DAPR_GRPC_PORT`
22+
* Replace both occurences of `CommunicationProtocolEnum.HTTP` with `CommunicationProtocolEnum.GRPC`
23+
* Instead of `npm run start:dapr-http` run `npm run start:dapr-grpc`

0 commit comments

Comments
 (0)