js-sdk
js-sdk copied to clipboard
Fix: Add DAPR_RUNTIME_HOST env variable support
Description
Settings.getDefaultHost() was hardcoded to return "127.0.0.1", ignoring the DAPR_RUNTIME_HOST environment variable. This meant users couldn't configure the client host via environment variables when running Dapr with custom ports.
Solution: Added support for the DAPR_RUNTIME_HOST environment variable in Settings.getDefaultHost():
Now users can configure both host and port via environment variables when Dapr CLI sets them automatically.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #646
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:
- [X] Code compiles correctly
- [X] Created/updated tests
- [X] Extended the documentation