Skip to content

Align examples with the developer guide series#5

Merged
EchinopsisM merged 3 commits into
mainfrom
feat/align-guide-sequence
May 27, 2026
Merged

Align examples with the developer guide series#5
EchinopsisM merged 3 commits into
mainfrom
feat/align-guide-sequence

Conversation

@EchinopsisM
Copy link
Copy Markdown
Collaborator

Summary

Aligns the example projects with the 7-guide developer series on docs.ethswarm.org so each guide has a complete, runnable companion project.

  • New upload-and-download/ example — the first guide previously had no companion code (two scripts: single file, and directory upload/download by path)
  • READMEs in every example folder — each links back to its corresponding guide and gives a one-screen orientation (what it does, setup, run, requirements)
  • .env.example in every folder + .gitignore updated to exclude .env, establishing a consistent setup pattern
  • website/ restructure — static files moved into site/ so UPLOAD_DIR has an unambiguous target; added package.json and upload script
  • Upload script fixesutils/upload-site.js no longer imports dotenv directly (broke ESM resolution since utils/ has no node_modules); callers now own dotenv.config(). Added dotenv dep, "type": "module", and an upload script to routing/package.json
  • npm scripts added to dynamic-content and multi-author-blog
  • Removed dead PUBLISHER_KEY from routing and routing-manifest .env.example

Test plan

All examples were run end-to-end against a local Bee node with a funded batch:

  • upload-and-download — both scripts
  • filesystem — all three scripts (manifest references match the guide)
  • routingnpm run build + npm run upload, verified /#/about and 404 handling
  • routing-manifest — upload → updateManifest → removeAndAddRoutes, verified /about and /moved-about resolution
  • dynamic-content — all three scripts
  • simple-blog — init → post create → read
  • multi-author-blog — init → add-post (alice, bob) → update-index → read → add-author
  • website — upload, verified site served via feed manifest

EchinopsisM and others added 3 commits May 25, 2026 21:08
- Add upload-and-download example folder (new, was missing)
- Add .env.example to all example folders
- Update .gitignore to exclude .env in filesystem, routing, routing-manifest, multi-author-blog
- Add npm run scripts to dynamic-content and multi-author-blog
- Add website package.json and .gitignore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Move website static files into site/ subdirectory so UPLOAD_DIR is unambiguous
- Remove dotenv import from utils/upload-site.js (was breaking ESM resolution
  since utils/ has no node_modules); callers now own dotenv.config()
- Add dotenv.config() to website/upload.js and routing/upload.js
- Add dotenv dep, "type": "module", and upload npm script to routing/package.json
- Remove dead PUBLISHER_KEY from routing/.env.example and routing-manifest/.env.example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add or refresh README.md in each example folder so anyone landing on the
folder via GitHub gets a one-screen orientation and a link back to the
corresponding guide on docs.ethswarm.org. Covers upload-and-download,
filesystem, routing, routing-manifest, dynamic-content, simple-blog,
multi-author-blog, and the existing website example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant