Files
status/wrangler.toml
2024-04-24 14:22:12 +00:00

31 lines
1.1 KiB
TOML

name = "status"
workers_dev = true
account_id = "278af70e005da2b9dad665f4340a2797"
type = "webpack"
webpack_config = "node_modules/flareact/webpack"
compatibility_date = "2021-07-23"
main = "index.js"
[triggers]
crons = ["*/5 * * * *"]
[build]
command = "npm run build"
account_id = "278af70e005da2b9dad665f4340a2797"
type = "webpack"
webpack_config = "node_modules/flareact/webpack"
[site]
bucket = "out"
#entry-point = "./"
#########################################################
# uncomment and adjust following if you are not using GitHub Actions
[env.production]
kv_namespaces = [{ binding = "KV_STATUS_PAGE", id = "372049296f6f43b0a9b27e53ee6c1f56" }]
#zone_id="xxx"
#route="xxx"
# export KV_NAMESPACE_ID=$(npx @cloudflare/wrangler kv:namespace list 2> >(tee stderr.log >&2) | head -1 | node -pe "JSON.parse(fs.readFileSync('/dev/stdin').toString()).find(kv => kv.title.includes('KV_STATUS_PAGE')).id")
# echo "[env.production]" >> wrangler.toml
# echo "kv_namespaces = [{binding=\"KV_STATUS_PAGE\", id=\"${KV_NAMESPACE_ID}\"}]" >> wrangler.toml