Update connect-two-peers-by-key-with-hyperdht.md (#80)

added missing instructions explicitly stating how to edit the client-app index.
This commit is contained in:
nonAnon
2024-02-29 08:50:29 -06:00
committed by GitHub
parent 924e1fa71d
commit dc7a0250dc

View File

@@ -59,6 +59,7 @@ cd client-app
pear init -y -t terminal
npm install hyperdht b4a
```
Alter `client-app/index.js` to the following:
``` javascript
import DHT from 'hyperdht'
@@ -83,4 +84,4 @@ pear dev -- <SUPPLY KEY HERE>
The `client-app` will spin up a client, and the public key copied earlier must be supplied as a command line argument for connecting to the server. The client process will log `got connection` into the console when it connects to the server.
Once it's connected, try typing in both terminals.
Once it's connected, try typing in both terminals.