serveTaskQueue
Purpose and behavior
Section titled “Purpose and behavior”Serve a caller-owned TaskQueue over HTTP at POST /queue, authenticated by bearer tokens. Listens on 127.0.0.1 and a port chosen by the system by default, without TLS. Rejects a fixed token that is not 32 to 512 non-whitespace characters.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”optionsRequiredQueueServerOptionsQueue to serve, accepted bearer tokens, and bind host and port.options.queueRequiredTaskQueueQueue served over HTTP; closing the server leaves it open.options.tokenRequiredstring | (() => 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.options.hostOptionalstring | undefinedBind address, default 127.0.0.1.options.portOptionalnumber | undefinedTCP port, default 0: the system picks a free port, shown in url.