mirror of
https://github.com/aljazceru/pear-docs.git
synced 2025-12-17 14:34:19 +01:00
Add block quotes in quickstart
This commit is contained in:
@@ -41,7 +41,7 @@ Helper modules can be used together with the building blocks to create cutting-e
|
||||
|
||||
<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a data-mention href="tools/hypershell.md">hypershell.md</a></td><td>A CLI to create and connect to P2P E2E encrypted shells.</td><td></td><td><a href="tools/hypershell.md">hypershell.md</a></td></tr><tr><td><a data-mention href="tools/hypertele.md">hypertele.md</a></td><td>A swiss-knife proxy powered by <a data-mention href="building-blocks/hyperdht.md">hyperdht.md</a>.</td><td></td><td><a href="tools/hypertele.md">hypertele.md</a></td></tr><tr><td><a data-mention href="tools/hyperbeam.md">hyperbeam.md</a></td><td>A one-to-one and end-to-end encrypted internet pipe.</td><td></td><td><a href="tools/hyperbeam.md">hyperbeam.md</a></td></tr><tr><td><a data-mention href="tools/hyperssh.md">hyperssh.md</a></td><td>A CLI to run SSH over the <a data-mention href="building-blocks/hyperdht.md">hyperdht.md</a>.</td><td></td><td><a href="tools/hyperssh.md">hyperssh.md</a></td></tr><tr><td><a data-mention href="tools/drives.md">drives.md</a></td><td>CLI to download, seed, and mirror a <a data-mention href="building-blocks/hyperdrive.md">hyperdrive.md</a> or a <a data-mention href="helpers/localdrive.md">localdrive.md</a>.</td><td></td><td><a href="tools/drives.md">drives.md</a></td></tr></tbody></table>
|
||||
|
||||
✔️These tools are extensively employed in the day-to-day development and operation of applications built on Holepunch, like [Keet.io](https://keet.io/).
|
||||
✔️ These tools are extensively employed in the day-to-day development and operation of applications built on Holepunch, like [Keet.io](https://keet.io/).
|
||||
|
||||
|
||||
## Applications built using Holepunch
|
||||
|
||||
@@ -38,11 +38,8 @@ Install the required dependencies
|
||||
npm install hyperswarm hypercore corestore hyperbee hyperdrive localdrive b4a debounceify graceful-goodbye --save
|
||||
```
|
||||
|
||||
{% endcode %}
|
||||
ℹ️ Every code example in this page is meant to be run standalone, so you can copy/paste each example into a JS file, and run it with NodeJS.
|
||||
|
||||
{% hint style="info" %}
|
||||
Every code example in this page is meant to be run standalone, so you can copy/paste each example into a JS file, and run it with NodeJS.
|
||||
{% endhint %}
|
||||
|
||||
### Hyperswarm's DHT: Connecting Two Peers by Key
|
||||
|
||||
@@ -50,11 +47,11 @@ Every code example in this page is meant to be run standalone, so you can copy/p
|
||||
|
||||
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.
|
||||
|
||||
{% hint style="info" %}
|
||||
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.
|
||||
{% endhint %}
|
||||
ℹ️ 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`.
|
||||
|
||||
@@ -369,9 +366,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.
|
||||
|
||||
{% hint style="info" %}
|
||||
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.
|
||||
{% endhint %}
|
||||
|
||||
ℹ️ 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.
|
||||
|
||||
|
||||
{% code title="writer.mjs" %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user