chore: upgrade to node 18 (#1061)

* chore: change `localhost` -> `127.0.0.1`

There is a change in how Node does DNS resolution in Node 18 vs
16 -- `localhost` resolves to `::1`, which is the equivalent of
`127.0.0.1` but in IPv6 instead of IPv4. The server however is
only listening on IPv4.
Reference:
https://github.com/nodejs/node/issues/40702#issuecomment-958143154

* refactor: change node version on CI from 16 to 18
This commit is contained in:
Danish Arora 2022-12-12 10:52:17 +05:30 committed by GitHub
parent 6e4ff0f2b8
commit eecdb6aeeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ on:
env:
NWAKU_VERSION: "v0.13.0"
NODE_JS: "16"
NODE_JS: "18"
jobs:
check:

View File

@ -395,7 +395,7 @@ export class Nwaku {
}
get rpcUrl(): string {
return `http://localhost:${this.rpcPort}/`;
return `http://127.0.0.1:${this.rpcPort}/`;
}
private async rpcCall<T>(