AbsoluteJS

absolutejs-queue-example

absolutejs-queue-examplev0.0.1betaDev Tools

Background jobs with @absolutejs/queue, shown across every framework AbsoluteJS supports. An in-process worker drains a typed job queue; every page — React, Vue, Svelte, Angular, HTML, or HTMX — enqueues work and polls the live status as the worker picks jobs up, retries the occasional transient failure, and marks them done.

#Installation

BASH
# Private workspace project: ~/abs/examples/queue

#Capabilities

Overview

Background jobs with @absolutejs/queue, shown across every framework AbsoluteJS supports. An in-process worker drains a typed job queue; every page — React, Vue, Svelte, Angular, HTML, or HTMX — enqueues work and polls the live status as the worker picks jobs up, retries the occasional transient failure, and marks them done.

How it works

Server (src/backend/queue.ts): defineJobs() declares the typed job

kinds and createJobRegistry() registers their handlers. The queue Elysia plugin mounts the in-process worker (auto-starts) and decorates the context with queue.enqueue. POST /api/enqueue adds a demo.task, and GET /api/jobs returns the current job list plus per-status counts. The handler simulates work and occasionally fails the first attempt so the queue's automatic retry is visible.

Client: every framework fetches GET /api/jobs on mount and polls it once

Show 1 more

a second, wiring an "Enqueue job" button to POST /api/enqueue and rendering the live stats + job list.

Run

Open , enqueue a few jobs, and watch them move from Queued to Running to Done (with a retry now and then).

One page per framework

Route — Framework

/ — React

/vue — Vue

Show 4 more

/svelte — Svelte

/angular — Angular

/html — HTML

/htmx — HTMX

Outcomes

What you can build

Build on the supported package contract

Use absolutejs-queue-example through its supported public entry points.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed absolutejs-queue-example version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Trace from the first failed boundary
Reproduce the smallest canonical absolutejs-queue-example example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#Run

Partial snippet

Working example for Run.

BASH
bun install
bun run dev

#Package commands

Scripts declared by this package manifest.

bun run devabsolute dev
bun run formatabsolute prettier --write
bun run lintabsolute eslint
bun run startabsolute start
bun run typecheckabsolute typecheck
Private workspace project
This project is maintained inside the workspace and is not published as a standalone npm package.