diff --git a/README.md b/README.md index 7ef7cfc..7085490 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Simple steps: - `yarn install` - `yarn addsecret` +- `yarn createkv` (follow `wrangler.toml` instructions) - `yarn deploy` ## Deploy (More involved) diff --git a/package.json b/package.json index 1891a4c..c99eb3c 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "deploy": "wrangler publish", "dev": "wrangler dev", "addsecret": "wrangler secret put WORKERLINKS_SECRET", + "createkv": "wrangler kv:namespace create KV && echo '^^^ Replace the binding on line 12 of wrangler.toml with this' ^^^", "build": "wrangler publish --dry-run --outdir=./dist" }, "dependencies": { diff --git a/wrangler.toml b/wrangler.toml index 96bd85e..1f668a0 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -5,13 +5,17 @@ main = "src/index.ts" #logpush = true # Change these!! -account_id = "ece1d09b06af2ced51407c97505ea0cc" -kv_namespaces = [ { binding = "KV", id = "1be44406edc142a084435e24dbf8ae1d", preview_id = "15cfb90ecd654b8f8a9ccd600832093f" }] +kv_namespaces = [ + + # Replace below line with your namespace ID ('yarn createkv' output) + { binding = "KV", id = "1be44406edc142a084435e24dbf8ae1d", preview_id = "15cfb90ecd654b8f8a9ccd600832093f" } + + ] compatibility_flags = [] compatibility_date = "2023-03-05" -# Remove or comment out the route line if using workers_dev +# Remove or comment out the route line if using workers_dev (and set below to true) workers_dev = false route = { pattern = "erisa.link/*", zone_name = "erisa.link" }