Skip to content

ethswarm-tools/perch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

perch

Publish a folder as a website on Swarm. deploy uploads a folder as a browsable Swarm collection and prints its bzz reference; with a feed it gives a stable URL that survives re-deploys — like Netlify/Surge, but on Swarm.

Built on the scout library (swarm-scout).

Published on crates.io as swarm-perch; the binary is perch.

Install

cargo install swarm-perch      # provides the `perch` command

Usage

# one-shot: upload a site, get a bzz reference (URL changes each deploy)
perch deploy ./site --stamp <batch>

# stable URL: point a feed at it so the address survives re-deploys
perch keygen                                              # save the key
perch deploy ./site --key <hex> -t <topic> --stamp <batch>
#   -> feed handle; open  <gateway>/bzz/<handle>/  and re-deploy to update
  • Uploads go to --node / $BEE_NODE (defaults to --gateway) and need --stamp / $BEE_STAMP. $PERCH_KEY can hold the feed key.
  • --index sets the default document (defaults to index.html), so bzz/<ref>/ renders your site and nested assets resolve normally.

How it works

deploy is two scout calls: upload the directory as a native Swarm collection (a mantaray manifest with an index document — a real browsable site), then optionally point a feed at that manifest so one address always serves your latest deploy.

Status

deploy / keygen, verified end-to-end against a live Bee node (2.7.2): deploy → view via the feed handle → re-deploy keeps the same handle and serves the updated site.

License

MIT


📖 Part of the scout toolkit (scout · stash · perch · keep).

About

Publish a folder as a website on Swarm, with a stable feed URL — built on scout

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages