Skip to content

Commit

Permalink
add browser-chat example (#107)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Frando authored Feb 25, 2025
1 parent 4fd0d72 commit 4146a38
Show file tree
Hide file tree
Showing 50 changed files with 12,886 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
- main
paths:
- "browser-echo/**"
- "browser-chat/**"
pull_request:
paths:
- "browser-echo/**"
- "browser-chat/**"
workflow_dispatch:
inputs:
pr_number:
description: "PR number"
required: true
type: string

Expand Down Expand Up @@ -92,7 +95,7 @@ jobs:
issue-number: ${{ github.event.pull_request.number || inputs.pr_number }}
comment-id: ${{ steps.fc.outputs.comment-id }}
body: |
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/
Deployment for this PR has been generated and is available at: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/${{ env.PREVIEW_PATH }}
Last updated: ${{ env.TIMESTAMP }}
edit-mode: replace
8 changes: 7 additions & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
# it builds all browser examples, and assembles them in a deploy-out directory
# together with a simple index.html with links to the individual examples.
[tasks.deploy]
dependencies = [{ name = "deploy", path = "browser-echo" }]
dependencies = [
{ name = "deploy", path = "browser-echo" },
{ name = "deploy", path = "browser-chat" },
]

script = '''
rm -r deploy-out || true
Expand All @@ -19,5 +22,8 @@ EOF
cp -r browser-echo/public deploy-out/browser-echo
echo '<li><a href="./browser-echo/index.html">browser-echo</li>' >> deploy-out/index.html
cp -r browser-chat/frontend/dist deploy-out/browser-chat
echo '<li><a href="./browser-chat/index.html">browser-chat</li>' >> deploy-out/index.html
echo '</ul></body></html>' >> deploy-out/index.html
'''
Loading

0 comments on commit 4146a38

Please sign in to comment.