example-helloworld
example-helloworld copied to clipboard
Update README to avoid error when localhost resolves to ::1
Problem:
If localhost resolves to ::1 (ipv6) rather than 127.0.0.1 (ipv4) the npm run start step will fail with
Let's say hello to a Solana account...
FetchError: request to http://localhost:8899/ failed, reason: connect ECONNREFUSED ::1:8899
<snipped>
The default Mac version of /etc/hosts contains ::1 localhost so this error will likely be encountered more frequently going forward.
Solution
Update the docs to suggest setting the solana config url to the ipv4 address to avoid the risk of localhost resolving to ipv6