Skip to content

Dev Server

The CLI provides a local development server that mimics the production Queuebase service.

Terminal window
npx queuebase dev [options]
FlagDescriptionDefault
--port <port>Server port3847
--callback <url>Callback URL for job executionhttp://localhost:3000/api/queuebase

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

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:

Terminal window
npx queuebase generate

See Scheduled Jobs for how to define schedules and CLI Reference for more on the generate command.

Run the dev server and your app in separate terminals:

Terminal window
# Terminal 1: Queuebase dev server
npx queuebase dev
# Terminal 2: Your app
npm run dev

The 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).