SST app that deploys a Hono API to Cloudflare.
- Cloudflare:
- Must have set the
CLOUDFLARE_API_TOKENvariable in your local environment, with theWorkers Scripts:Edit,Workers R2 Storage:EditandAccount Settings:Readpermissions.
- Must have set the
- mise:
- Install mise, which manages Node and pnpm.
mise install
pnpm installpnpm sst deploy-
Grab the
<WORKER_ROUTE_URL>from the deployment outputs:✔ Complete url: <WORKER_ROUTE_URL>
-
Upload the
package.jsonto the R2 bucket using your Hono API endpoint:curl -H "Content-Type: application/json" -T "package.json" <WORKER_ROUTE_URL>
-
Navigate to
<WORKER_ROUTE_URL>to see the uploadedpackage.jsonfile.
pnpm sst remove