Queue playground

Explore the existing Queue playground app and the files that show the end-to-end runtime flow.

The Queue playground is intentionally small. It shows one discovered queue and one API route that enqueues a payload.

Start here

Inspect these files first:

  • packages/queue/playground/server/queues/welcome-email.ts
  • packages/queue/playground/api/queues/welcome.post.ts
  • packages/queue/playground/app/pages/index.vue
  • packages/queue/playground/README.md

Run the playground

Terminal
pnpm -C packages/queue/playground dev

Trigger one job

Terminal
curl -X POST http://localhost:3000/api/queues/welcome \
  -H 'content-type: application/json' \
  -d '{"email":"ava@example.com"}'

What to look for

  • the queue file welcome-email.ts becomes the queue name welcome-email
  • the API route calls runQueue('welcome-email', ...)
  • switching the runtime preset changes the provider without changing the application call site

Useful follow-ups