-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment
Deploy your own instance of the FreeFlow Worker to your own Cloudflare account. Nothing is shared infrastructure — you own the domain, the KV data, and the secret.
- Cloudflare account
-
wranglerCLI (installed via repo devDependency, or globally) - Node.js for running
npmscripts
cp wrangler.toml.example wrangler.toml
wrangler kv namespace create HTML_DRAFTS
wrangler kv namespace create HTML_DRAFTS --previewPaste the two returned namespace IDs into wrangler.toml under the HTML_DRAFTS binding. wrangler.toml is git-ignored — it holds account-specific IDs and should not be committed.
wrangler secret put SECRET_API_KEYThis is the bearer token every /upload request must present. Generate something long and random — it is the only auth on the write path.
npm install
npm run worker:deployThis runs wrangler deploy, which publishes src/index.js to your Cloudflare account and binds it to the KV namespace configured above.
After deploy, Wrangler prints your Worker's URL (e.g. https://freeflow.<your-subdomain>.workers.dev, or a custom domain if configured in wrangler.toml). This is DK_PUBLISH_URL for the CLI — see CLI Usage.
npm run worker:devRuns the Worker locally via wrangler dev against local/simulated KV.
Edit src/index.js, then re-run npm run worker:deploy. There is no build step — the file is deployed as-is.
- Architecture for what's actually being deployed
- Security for hardening still outstanding before treating this as production-grade for sensitive content