Skip to content
Français

QueueServerOptions

import type { QueueServerOptions } from "@elie-laloum/outpost";
  • queueRequired
    TaskQueue
    Queue served over HTTP; closing the server leaves it open.
  • tokenRequired
    string | (() => readonly string[] | Promise<readonly string[]>)
    Accepted bearer token of 32 to 512 non-whitespace characters, or a function returning the accepted tokens, called on every request. Return the old and new tokens together during a rotation; an empty list or a thrown error rejects every request.
  • hostOptional
    string | undefined
    Bind address, default 127.0.0.1.
  • portOptional
    number | undefined
    TCP port, default 0: the system picks a free port, shown in url.
export interface QueueServerOptions {
  readonly queue: TaskQueue;
  readonly token:
    string | (() => readonly string[] | Promise<readonly string[]>);
  readonly host?: string;
  readonly port?: number;
}