TypeScript
3
2 commits
updated Sep 1, 2024
This is an example of how to use QStash Workflow with Cloudflare Workers with Hono router. You can learn more in Workflow documentation for Hono.
[!TIP] You can use the
bootstrap.shscript to run this example with a local tunnel.Simply set the environment variables as explained below and run the following command in the
qstash-js/examples/workflowdirectory:bash bootstrap.sh cloudflare-workers-hono
npm install
.dev.vars file.QSTASH_URL=
QSTASH_TOKEN=
ngrok http 3001
Also, set the UPSTASH_WORKLFOW_URL environment variable to the public url provided by ngrok.
npm run dev
POST request to the /workflow endpoint.curl -X POST "http:localhost:3001/workflow" -d '{"text": "hello world!"}'
You can use wrangler to deploy the project to Cloudflare Workers.
npm run deploy
TypeScript
3
2 commits
updated Sep 1, 2024
This is an example of how to use QStash Workflow with Cloudflare Workers with Hono router. You can learn more in Workflow documentation for Hono.
[!TIP] You can use the
bootstrap.shscript to run this example with a local tunnel.Simply set the environment variables as explained below and run the following command in the
qstash-js/examples/workflowdirectory:bash bootstrap.sh cloudflare-workers-hono
npm install
.dev.vars file.QSTASH_URL=
QSTASH_TOKEN=
ngrok http 3001
Also, set the UPSTASH_WORKLFOW_URL environment variable to the public url provided by ngrok.
npm run dev
POST request to the /workflow endpoint.curl -X POST "http:localhost:3001/workflow" -d '{"text": "hello world!"}'
You can use wrangler to deploy the project to Cloudflare Workers.
npm run deploy