Update quick-start.md

This commit is contained in:
Ribhav28
2024-01-17 14:58:37 +05:30
committed by GitHub
parent 1a08f0b28e
commit 0e66acea5c

View File

@@ -47,11 +47,11 @@ npm install hyperswarm hypercore corestore hyperbee hyperdrive localdrive b4a de
In the HyperDHT, peers are identified by a public key, not by an IP address. If you know someone's public key, you can connect to them regardless of where they're located, even if they move between different networks.
```
: Hyperswarm's holepunching will fail if both the client peer and the server peer are on randomizing NATs, in which case the connection must be relayed through a third peer. Hyperswarm does not do any relaying by default.
For example, Keet implements its own relaying system wherein other call participants can serve as relays -- the more participants in the call, the stronger overall connectivity becomes.
```
Let's use the HyperDHT to create a basic CLI chat app where a client peer connects to a server peer by public key. This example consists of two files: `client.mjs` and `server.mjs`.
@@ -362,9 +362,9 @@ The example consists of three files: `writer.mjs` , `bee-reader.mjs` and `core-r
`writer.mjs` stores 100k entries from a given dictionary file into a Hyperbee instance. The Corestore instance used to create the Hyperbee instance is replicated using Hyperswarm. This enables other peers to replicate their Corestore instance and download the dictionary data into their local Hyperbee instances.
```
Download the `dict.json.gz` compressed file from the [GitHub repository](https://github.com/holepunchto/examples/blob/main/quick-start/hyperbee/dict.json.gz) to the folder where the `writer.mjs`is present. The compressed file contains 100K dictionary words.
```
```javascript
writer.mjs