# Copy to wrangler.toml and fill in the two IDs. See docs/workers.md.
= "postrust"
= "build/worker/shim.mjs"
= "2025-09-01"
[]
= "cargo install -q worker-build --version 0.8.6 --locked && worker-build --release"
# `npx wrangler hyperdrive create postrust --connection-string=...`, connecting
# as a NOINHERIT authenticator that holds no privileges of its own.
[[]]
= "HYPERDRIVE"
= "<hyperdrive id>"
# `npx wrangler kv namespace create POSTRUST_SCHEMA_CACHE`. Optional, but
# without it every new isolate reads the catalog itself.
[[]]
= "POSTRUST_SCHEMA_CACHE"
= "<namespace id>"
# Reload the schema cache, so a migration shows up without a redeploy.
[]
= ["*/15 * * * *"]
# Run the Worker near the database rather than near each client: a request
# waits on the database several times and on the client once. Name the
# region your database is in, or use mode = "smart". Region hints need a
# recent wrangler.
# [placement]
# region = "aws:us-east-1"
# The server's own variables. Secrets -- PGRST_JWT_SECRET and, to enable
# POST /_/reload, POSTRUST_RELOAD_SECRET -- go in with `wrangler secret put`.
[]
= "public"
= "web_anon"