This commit is contained in:
dmc
2024-02-12 18:40:22 +01:00
parent 913eb8ffdb
commit 696fec2b86
12 changed files with 31 additions and 5 deletions

View File

@@ -1,5 +1,11 @@
# Getting Started with Pear
Pear Runtime can be installed from the [pears.com](pears.com) or via [npm](https://www.npmjs.com/).
Since `npm` (or equivalent package manager) is needed to install application dependencies this guide will walk through installing `pear` with `npm`.
> [Build with Pear - Episode 01: Developing with Pear](https://youtu.be/y2G97xz78gU?si=gJ9gNDXrDztXtc4V)
## Requirements
Pear runs on Windows, Mac and Linux.
@@ -35,7 +41,7 @@ If not, the first run of `pear` will fetch the platform from peers, after which
To check that Pear is fully working, try the following command:
```
pear run keet
pear run pear://keet
```
Pear loads applications from peers, so this command should open [Keet](https://keet.io) whether or not it was downloaded and installed beforehand.

View File

@@ -4,8 +4,9 @@ This guide demonstrates how to build a peer-to-peer chat application.
It continues where [Starting a Pear Desktop Project](./starting-a-pear-desktop-project.md) left off.
## Step 1. HTML Structure and CSS Styles
> [Build with Pear - Episode 01: Developing with Pear](https://www.youtube.com/watch?v=y2G97xz78gU)
## Step 1. HTML Structure and CSS Styles
The project folder should contain:
@@ -263,7 +264,7 @@ function onMessageAdded (from, message) {
> Note that the `pear` dependency is used, even though it was not installed. This is the [Pear API](../reference/api.md), available to any Pear project.
## Step 5. Chat
## Step 4. Chat
Open two app instances by running `pear dev` in two terminals.

View File

@@ -1,5 +1,7 @@
# Making a Pear Terminal Application
> [Build with Pear - Episode 04: Pear Terminal Applications]https://www.youtube.com/watch?v=73KVE0wocTE
## Step 1. Install modules
This app uses these modules: `hyperswarm`, `hypercore-crypto`, and `b4a`.

View File

@@ -4,6 +4,8 @@ Pear applications are stored in an append-only log ([hypercore](../building-bloc
Each version is identified by `<fork>.<length>.<key>`. The length corresponds to the length of the application's append-only log at the time.
> [Build with Pear - Episode 03: Releasing Pear Applications](https://www.youtube.com/watch?v=UuzTlzEET4o)
`pear run <key>` opens the application.
Before a release has been marked, the latest version is used. This is useful during development, to test the app locally and to share a preview with other peers.

View File

@@ -2,6 +2,8 @@
Applications can be shared with peers by seeding them to the network from an efficient local data structure (a [hypercore](../bulding-blocks.md#hyeprcore])). We call the mirroring of a local file system into the Pear platform Application Storage "staging". Seeding is sharing an app from a machine over the Distributed Hash Table (DHT) (via [hyperswarm](../building-blocks.md#hyperswarm)) so that other peers can replicate, consume and reseed the application.
> [Build with Pear - Episode 02: Sharing Pear Applications](https://www.youtube.com/watch?v=slYj9_ifpZQ)
This guide can either follow on from, [Making a Pear Desktop Application](./making-a-pear-desktop-app.md), [Making a Pear Terminal Application](./making-a-pear-terminal-app.md), or get setup quickly with the following:
```bash

View File

@@ -2,6 +2,8 @@
This section shows how to generate, configure, and develop a Pear desktop project, in preparation for [Making a Pear Desktop Application](./making-a-pear-desktop-app.md).
> [Build with Pear - Episode 01: Developing with Pear](https://youtu.be/y2G97xz78gU?si=gJ9gNDXrDztXtc4V)
## Step 1. Initialization
Use `pear init` to create a new Pear project.

View File

@@ -1,5 +1,7 @@
# Starting a Pear Terminal Project
> [Build with Pear - Episode 04: Pear Terminal Applications]https://www.youtube.com/watch?v=73KVE0wocTE
## Step 1. Init
First create a new project using `pear init`.