Production
Terminal
npx wrangler d1 create enquiry-catalog-db # put the returned ID in wrangler.jsonc
npx wrangler secret put EDIT_PASSCODE
npx wrangler secret put FORWARD_TO # verified Email Routing destination that gets a copy of every inbound email
npm run db:migrate:remote
npm run deploy # serves enquiries.appneurox.comDeploy from your machine
Important
The wrangler login sees several Cloudflare accounts. Set CLOUDFLARE_ACCOUNT_ID to the APPNEURAL account in your shell first, or Wrangler stops to ask.
Terminal
npm install
npm run db:migrate:remote
npm run deploySet the secrets once (they stay across deploys):
Terminal
npx wrangler secret put EDIT_PASSCODE
npx wrangler secret put FORWARD_TODatabase migrations
Applied in order from migrations/:
| # | Migration |
|---|---|
| 0001 | create enquiries |
| 0002 | add domains |
| 0003 | add email threads |
Check that it is live
Terminal
curl https://enquiries.appneurox.com/healthIt answers {"status":"ok"} when the Worker and its database are up.