Dev Server
The CLI provides a local development server that mimics the production Queuebase service.
npx queuebase dev [options]Options
Section titled “Options”| Flag | Description | Default |
|---|---|---|
--port <port> | Server port | 3847 |
--callback <url> | Callback URL for job execution | http://localhost:3000/api/queuebase |
What it does
Section titled “What it does”The dev server:
- Runs a local HTTP API on the specified port
- Stores jobs in a local SQLite database
- Syncs scheduled jobs from the manifest on startup (see below)
- Polls for pending jobs and calls back to your app to execute them
- Handles retries, backoff, and scheduling locally
Schedule sync
Section titled “Schedule sync”On startup, the dev server reads .queuebase/queuebase.manifest.json and syncs any scheduled jobs into the local database. This means your cron schedules are active as soon as the dev server starts — no manual setup required.
To generate the manifest, run:
npx queuebase generateSee Scheduled Jobs for how to define schedules and CLI Reference for more on the generate command.
Typical setup
Section titled “Typical setup”Run the dev server and your app in separate terminals:
# Terminal 1: Queuebase dev servernpx queuebase dev
# Terminal 2: Your appnpm run devThe dev server accepts enqueue requests on http://localhost:3847 and calls back to your app’s handler at the configured callback URL (default: http://localhost:3000/api/queuebase).