Skip to content

Commit b1f4311

Browse files
committed
bee ok
0 parents  commit b1f4311

13 files changed

+412592
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
build

.swcrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[
2+
{
3+
"test": ".*\\.js$",
4+
"jsc": {
5+
"parser": {
6+
"syntax": "ecmascript",
7+
}
8+
}
9+
},
10+
{
11+
"test": ".*\\.jsx$",
12+
"jsc": {
13+
"parser": {
14+
"syntax": "ecmascript",
15+
"jsx": true
16+
},
17+
"transform": {
18+
"react": {
19+
"runtime": "automatic"
20+
}
21+
}
22+
}
23+
}
24+
]

.swcrcdev

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[
2+
{
3+
"test": ".*\\.js$",
4+
"jsc": {
5+
"parser": {
6+
"syntax": "ecmascript"
7+
}
8+
}
9+
},
10+
{
11+
"test": ".*\\.jsx$",
12+
"jsc": {
13+
"parser": {
14+
"syntax": "ecmascript",
15+
"jsx": true
16+
},
17+
"transform": {
18+
"react": {
19+
"runtime": "automatic",
20+
"development": true,
21+
"refresh": true
22+
}
23+
}
24+
}
25+
}
26+
]

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Overview
2+
- Example of Pear desktop app with Javascript + React + Hyperswarm + Corestore + Hyperbee
3+
- Multiple app instances can run concurrently (same machine or different machines)
4+
to connect and replicate messages
5+
6+
# Getting started
7+
## Prod mode
8+
```shell
9+
npm i
10+
npm run build
11+
npm start
12+
```
13+
14+
## Dev mode
15+
```shell
16+
npm i
17+
npm run dev
18+
```
19+
20+
# Run
21+
- Open two apps, e.g. run `npm run dev` in two terminals
22+
- On the first app,
23+
- click Start writer
24+
- wait for core created with a core key
25+
- On the second app
26+
- copy the above core key into the reader input box
27+
- click Start reader
28+
- wait for started
29+
- Go back to first app, send a message, the second app will receive it

0 commit comments

Comments
 (0)