Skip to content

Commit 4146a38

Browse files
authored
add browser-chat example (#107)
This adds a new example: A chat app based on iroh gossip, running both in the browser and on the command line. See the README for details. * based on #106 for CI infrastructure added there * uses n0-computer/iroh#3189 and n0-computer/iroh-gossip#37
1 parent 4fd0d72 commit 4146a38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+12886
-2
lines changed

.github/workflows/deploy.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ on:
66
- main
77
paths:
88
- "browser-echo/**"
9+
- "browser-chat/**"
910
pull_request:
1011
paths:
1112
- "browser-echo/**"
13+
- "browser-chat/**"
1214
workflow_dispatch:
1315
inputs:
1416
pr_number:
17+
description: "PR number"
1518
required: true
1619
type: string
1720

@@ -92,7 +95,7 @@ jobs:
9295
issue-number: ${{ github.event.pull_request.number || inputs.pr_number }}
9396
comment-id: ${{ steps.fc.outputs.comment-id }}
9497
body: |
95-
Deployment for this PR has been generated and is available at: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/${{ env.PREVIEW_PATH }}/browser-echo/
98+
Deployment for this PR has been generated and is available at: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/${{ env.PREVIEW_PATH }}
9699
97100
Last updated: ${{ env.TIMESTAMP }}
98101
edit-mode: replace

Makefile.toml

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
# it builds all browser examples, and assembles them in a deploy-out directory
55
# together with a simple index.html with links to the individual examples.
66
[tasks.deploy]
7-
dependencies = [{ name = "deploy", path = "browser-echo" }]
7+
dependencies = [
8+
{ name = "deploy", path = "browser-echo" },
9+
{ name = "deploy", path = "browser-chat" },
10+
]
811

912
script = '''
1013
rm -r deploy-out || true
@@ -19,5 +22,8 @@ EOF
1922
cp -r browser-echo/public deploy-out/browser-echo
2023
echo '<li><a href="./browser-echo/index.html">browser-echo</li>' >> deploy-out/index.html
2124
25+
cp -r browser-chat/frontend/dist deploy-out/browser-chat
26+
echo '<li><a href="./browser-chat/index.html">browser-chat</li>' >> deploy-out/index.html
27+
2228
echo '</ul></body></html>' >> deploy-out/index.html
2329
'''

0 commit comments

Comments
 (0)