Skip to content

Commit 6af4d24

Browse files
authored
feat: browser-blobs example (#139)
This adds a small example for running iroh-blobs in the browser. demo: https://n0-computer.github.io/iroh-examples/pr/139/browser-blobs/index.html
1 parent 2dc4dfa commit 6af4d24

File tree

16 files changed

+5458
-0
lines changed

16 files changed

+5458
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ on:
77
paths:
88
- "browser-echo/**"
99
- "browser-chat/**"
10+
- "browser-blobs/**"
1011
pull_request:
1112
paths:
1213
- "browser-echo/**"
1314
- "browser-chat/**"
15+
- "browser-blobs/**"
1416
workflow_dispatch:
1517
inputs:
1618
pr_number:

Makefile.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
dependencies = [
88
{ name = "deploy", path = "browser-echo" },
99
{ name = "deploy", path = "browser-chat" },
10+
{ name = "deploy", path = "browser-blobs" },
1011
]
1112

1213
script = '''
@@ -25,5 +26,8 @@ echo '<li><a href="./browser-echo/index.html">browser-echo</li>' >> deploy-out/i
2526
cp -r browser-chat/frontend/dist deploy-out/browser-chat
2627
echo '<li><a href="./browser-chat/index.html">browser-chat</li>' >> deploy-out/index.html
2728
29+
cp -r browser-blobs/public deploy-out/browser-blobs
30+
echo '<li><a href="./browser-blobs/index.html">browser-blobs</li>' >> deploy-out/index.html
31+
2832
echo '</ul></body></html>' >> deploy-out/index.html
2933
'''

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ Use iroh in the browser, compiled to web assembly. [Try it here!](https://n0-com
1616
A chat app based on iroh-gossip that can run both in the browser and on the command line.
1717
[Try it here!](https://n0-computer.github.io/iroh-examples/main/browser-chat/index.html)
1818

19+
### [browser-blobs](browser-blobs)
20+
21+
Small example for running [iroh-blobs](https://github.com/n0-computer/iroh-blobs) in the browser.
22+
[Try it here!](https://n0-computer.github.io/iroh-examples/main/browser-blobs/index.html)
23+
1924
### [custom-router](custom-router)
2025

2126
When you need more control or customizations than the

browser-blobs/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/public/wasm
2+
/package-lock.json
3+
/node_modules
4+
/target

0 commit comments

Comments
 (0)