ApiNodeFunctions
Function: runNodeWorker()
function runNodeWorker(scope?, options?): void;Defined in: packages/core/src/node/worker.ts:267
In a worker: starts a node when a page asks (startNodeInWorker), or lets
the page share the one already running for the same account and stores,
and serves it until the last page using it lets go. In a SharedWorker
each page arrives by connect.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
scope? | WorkerScope | globalThis | - |
options? | { openStores?: (stores) => StoreFactory; } | {} | - |
options.openStores? | (stores) => StoreFactory | undefined | Opens the stores the page described. Default workerStores; a test hands out memory ones. |
Returns
void