Skip to content

Configuration

VariableDescriptionDefault
QUEUEBASE_API_URLQueuebase API endpointhttp://localhost:3847 (dev)
QUEUEBASE_API_KEYAPI key for production
QUEUEBASE_CALLBACK_URLYour app’s webhook endpointhttp://localhost:3000/api/queuebase
QUEUEBASE_WEBHOOK_SECRETSecret for webhook signature verification

If QUEUEBASE_WEBHOOK_SECRET is set, the handler automatically verifies HMAC-SHA256 signatures on incoming requests (via the X-Queuebase-Signature header) and rejects unsigned or invalid requests.

In development this is optional. In production you should always set a webhook secret to prevent unauthorized job executions.

The defineConfig helper provides defaults and reads from environment variables:

import { defineConfig } from "@queuebase/nextjs";
export const config = defineConfig({
jobsDir: "./src/jobs",
callbackUrl: "http://localhost:3000/api/queuebase",
apiUrl: "http://localhost:3847",
apiKey: undefined,
});
OptionTypeDescriptionDefault
jobsDirstringDirectory containing job definitions./src/jobs
callbackUrlstringWebhook endpoint URLQUEUEBASE_CALLBACK_URL env var, or http://localhost:3000/api/queuebase
apiUrlstringQueuebase API endpointQUEUEBASE_API_URL env var, or auto-detected by NODE_ENV
apiKeystringAPI keyQUEUEBASE_API_KEY env var

Environment variables always take precedence over values passed to defineConfig.