You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Support for the DAPR_HTTP_ENDPOINT and DAPR_GRPC_ENDPOINT environment variables. Adds support for DAPR_API_TOKEN to gRPC client (#519)
* feat: Adds endpoint parsing
Signed-off-by: Elena Kolevska <[email protected]>
* Adds support for the DAPR_HTTP_ENDPOINT environment variable
Signed-off-by: Elena Kolevska <[email protected]>
* Adds tests for endpoint environment variables (HTTP only)
Signed-off-by: Elena Kolevska <[email protected]>
* test: Adds tests for endpoint environment variables (HTTP only)
Signed-off-by: Elena Kolevska <[email protected]>
* fix(style) Linter fixes
Signed-off-by: Elena Kolevska <[email protected]>
* Adds support for dapr-api-token metadata
Signed-off-by: Elena Kolevska <[email protected]>
* Adds support for the DAPR_GRPC_ENDPOINT environment variable
Signed-off-by: Elena Kolevska <[email protected]>
* Fixes linter issues
Signed-off-by: Elena Kolevska <[email protected]>
* Fixes linter issues
Signed-off-by: Elena Kolevska <[email protected]>
* Only add api token interceptor if it’s specified
Signed-off-by: Elena Kolevska <[email protected]>
* Reorganises the code a bit
Signed-off-by: Elena Kolevska <[email protected]>
* Runs pretty-fix
Signed-off-by: Elena Kolevska <[email protected]>
* Adds test for scheme prefix removal for grpc
Signed-off-by: Elena Kolevska <[email protected]>
* Apply suggestions from code review
Co-authored-by: Shubham Sharma <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
* Apply suggestions from code review
Co-authored-by: Shubham Sharma <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
* Adds examples for the parseEndpoint function
Signed-off-by: Elena Kolevska <[email protected]>
* Adds tests for the dapr-api-token metadata in gRPC calls
Signed-off-by: Elena Kolevska <[email protected]>
* Updates after review
Signed-off-by: Elena Kolevska <[email protected]>
* docs: Adds info and examples about the new environment variables to the docs
Signed-off-by: Elena Kolevska <[email protected]>
* Addresses review comments
Signed-off-by: Elena Kolevska <[email protected]>
* Small formatting fix
Signed-off-by: Elena Kolevska <[email protected]>
* Fixes docs
Signed-off-by: Elena Kolevska <[email protected]>
---------
Signed-off-by: Elena Kolevska <[email protected]>
Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Shubham Sharma <[email protected]>
Copy file name to clipboardExpand all lines: daprdocs/content/en/js-sdk-docs/js-client/_index.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,22 @@ dapr run --app-id example-sdk --app-protocol grpc -- npm run start
77
77
npm run start:dapr-grpc
78
78
```
79
79
80
+
### Environment Variables
81
+
82
+
You can use the `DAPR_HTTP_ENDPOINT` and `DAPR_GRPC_ENDPOINT` environment variables to set the Dapr Sidecar's HTTP and gRPC endpoints respectively. When these variables are set, the `daprHost` and `daprPort` don't have to be passed to the constructor, the client will parse them automatically out of the provided endpoints.
If the environment variables are set, but `daprHost` and `daprPort` values are passed to the constructor, the latter will take precedence over the environment variables.
0 commit comments