Deploy an existing app (web upload)
Already have a built site — a React/Vue/Svelte SPA, a static site generator's output, plain HTML/CSS/JS — and just want to put it on DIG? This page is that path: no CLI, no scaffolding, just your existing dist//build/ folder through DIGHUb's web upload.
If you're starting a new project from scratch instead, see the Quickstart or the full tutorial. If you'd rather drive this from a terminal/CI, the CLI does the identical thing — see Publish from the CLI.
How DIG serves your app (the mental model)
A DIG store is your site's file set — every file you upload becomes one addressable resource, keyed by its path. There's no separate "deploy config" describing routes: the files you give it are the entire app.
- The store = your files, addressed by path. Upload
index.html,assets/app.js,assets/logo.pngand each keeps that exact path as its resource key (nested folders included —assets/app.jsstaysassets/app.js, not flattened). This is the samepathfield the on-chain capsule format records for every public resource. index.htmlis the default view. Omit a path (or ask for/) and DIG servesindex.html— the same convention a web server uses for/. Seechia://addressing and the normative resourceKey normalization rules.- A URN/root always maps to one exact set of files. Every time you publish, the current file set is sealed into a new immutable generation — a
(storeId, rootHash)pair, i.e. a capsule. Readingurn:dig:chia:<storeId>/<path>(optionally pinned to arootHash) always resolves to the bytes that were live in that generation — so a shared link never silently changes under the person you shared it with unless you meant it to (omit the root for "always the latest"). - Client-side routing works like it does on any static host. DIG doesn't run a server-side router — if your SPA uses
history.pushStaterouting, configure your build the way you would for any static host (a catch-all that servesindex.htmlfor unknown paths client-side); nothing DIG-specific to change here. - Everything is encrypted client-side before it ever reaches DIGHUb. DIGHUb (and every host) only ever sees ciphertext — see URNs & Encryption if you want the mechanism.
Worked example: take a built SPA from dist/ to live
This assumes you already have a production build — npm run build (Vite/CRA/Next static export/etc.) producing a dist/ (or build/, out/) folder with an index.html at its root plus nested assets/, js/, css/ subfolders. Nothing about this is DIG-specific; it's whatever your framework already produces.