Skip to content

Commit

Permalink
ts-web/*: Fix connecting to envoy from Node.js>=17 using ipv4
Browse files Browse the repository at this point in the history
Node.js>=17 resolves localhost to ::1 instead of 127.0.0.1 and our envoy config
doesn't listen for that.
  • Loading branch information
lukaw3d committed May 11, 2023
1 parent fa46ac8 commit a86df5d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client-sdk/ts-web/core/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,5 @@ When you create an `oasis.client.NodeInternal`, pass the HTTP endpoint of your
Envoy proxy:

```js
const client = new oasis.client.NodeInternal('http://localhost:42280');
const client = new oasis.client.NodeInternal('http://127.0.0.1:42280');
```
2 changes: 1 addition & 1 deletion client-sdk/ts-web/core/playground/src/startPlayground.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as oasis from '@oasisprotocol/client';

export async function startPlayground() {
const nic = new oasis.client.NodeInternal('http://localhost:42280');
const nic = new oasis.client.NodeInternal('http://127.0.0.1:42280');
// Wait for ready.
{
console.log('waiting for node to be ready');
Expand Down
2 changes: 1 addition & 1 deletion client-sdk/ts-web/rt/playground/src/consensus.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function delay(duration) {
});
}

const nic = new oasis.client.NodeInternal('http://localhost:42280');
const nic = new oasis.client.NodeInternal('http://127.0.0.1:42280');
const accountsWrapper = new oasisRT.accounts.Wrapper(CONSENSUS_RT_ID);
const consensusWrapper = new oasisRT.consensusAccounts.Wrapper(CONSENSUS_RT_ID);

Expand Down
2 changes: 1 addition & 1 deletion client-sdk/ts-web/rt/playground/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function moduleEventHandler(
return /** @type {oasisRT.event.ModuleHandler} */ ([MODULE_NAME, codes]);
}

const nic = new oasis.client.NodeInternal('http://localhost:42280');
const nic = new oasis.client.NodeInternal('http://127.0.0.1:42280');
const accountsWrapper = new oasisRT.accounts.Wrapper(KEYVALUE_RUNTIME_ID);
const rewardsWrapper = new oasisRT.rewards.Wrapper(KEYVALUE_RUNTIME_ID);
const coreWrapper = new oasisRT.core.Wrapper(KEYVALUE_RUNTIME_ID);
Expand Down

0 comments on commit a86df5d

Please sign in to comment.