examples/storefront Public
// storefront-api: the public HTTP API. Create the database once with// `npx wrangler d1 create storefront` and put its id in database_id.{ "$schema": "node_modules/wrangler/config-schema.json", "name": "storefront-api", "main": "src/index.ts", "compatibility_date": "2026-09-01", "observability": { "enabled": true }, "d1_databases": [ { "binding": "DB", "database_name": "storefront", "database_id": "", "migrations_dir": "migrations" } ], "r2_buckets": [{ "binding": "IMAGES", "bucket_name": "storefront-images" }], // storefront-images is public on this custom domain (R2 > Settings > Custom Domains). "vars": { "IMAGES_URL": "https://images.larkspur.shop" }, "triggers": { "crons": ["*/5 * * * *"] }, "services": [{ "binding": "PAYMENTS", "service": "storefront-payments", "entrypoint": "PaymentsService" }], "queues": { "producers": [{ "binding": "ORDER_EVENTS", "queue": "order-events" }] }}