Open
Conversation
- Add server.js: custom Node.js HTTP server (ESM) that wraps Next.js
in development and serves the static export in production, while
adding four new route handlers:
/ipfs/<cid>/... — immutable IPFS content gateway
/ipns/<name>/... — IPNS gateway with 5-min in-memory cache
POST /api/deploy — authenticated CAR-file import into IPFS
POST /api/ipns/publish — authenticated IPNS key update
- Add dependencies: kubo-rpc-client, mime-types, express-rate-limit
- Update package.json scripts:
dev → npm run render:markdown && node server.js
start → NODE_ENV=production node server.js
main → server.js
- Update next.config.mjs: add trailingSlash and images.unoptimized
for full static-export / IPFS compatibility
- Add .github/workflows/deploy.yml: CD workflow triggered on push to
real/currents that builds the site, deploys to Gandi via Git push,
packages out/ as a CAR file, uploads it to IPFS through the Gandi
gateway, and updates the xr-baseline-0 IPNS pointer
- Add .env.example documenting IPFS_NODE_HOST, IPFS_USER, IPFS_PASS,
DEPLOY_SECRET, NODE_ENV, and PORT
Co-authored-by: John Hall <dancingfrog@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrate IPFS/IPNS capabilities into the Real-Currents site to provide immutable snapshots and stable, updateable content pointers.
This PR implements a 3-tier IPFS integration:
server.js) that handles live site traffic, acts as an IPFS/IPNS gateway, and provides authenticated API endpoints for deployment.This setup ensures full compatibility with conventional HTTP clients while leveraging IPFS for content addressability and immutability.