npm install -g wrangler
or bun add -d wrangler
).wrangler.jsonc
(or wrangler.toml
):
name
property reflects the desired name for your Worker service.main
property points to the correct entry file (likely related to src/app/index.ts
after build). (Exact path depends on build output)compatibility_date
and update if necessary.account_id
is present or configured via environment variables/secrets if needed.tsc
or another bundler (like esbuild via Hono’s build tools) to compile the code, often outputting to a dist
directory.
wrangler.jsonc
. After deployment, it will usually output the URL where the Worker is accessible.
.github/workflows/deploy.yml
).bun install
).bun run build
).wrangler deploy
).CF_API_TOKEN
) and CF_ACCOUNT_ID
securely as secrets in your CI/CD environment. The Wrangler deploy command can use these environment variables for authentication.