- JavaScript 96%
- HTML 3%
- CSS <1%
- TypeScript <1%
Content-addressed version deploy system for Diffuse. Allows the user to pick a deployed version of Diffuse.
How to use #
- Install
denoandfclones deno run build- Optionally run a deploy command
Deploying #
deno task deploy:ipfs
deno task deploy:statichost diffuse
The statichost deploy builds and zips the site with the zip task, then uploads diffuse.zip via the direct upload API. It needs a STATICHOST_APIKEY (create one at https://builder.statichost.eu/account) and your site name (as an argument or STATICHOST_SITE).
Diffuse records the version slug it is running as in localStorage (diffuse/last-version-used). The generated root index.html reads it and redirects there when that version is still deployed, falling back to /latest/ otherwise. This is what makes / return to the version you used last.
The same page is also served for /my/* and /me/*, which keep the rest of the path: /my/dashboard/ (or /me/dashboard/) redirects to the version you used last with that suffix (eg. /4.0.0/dashboard/), falling back to /latest/dashboard/ when no known version is stored.