# Function: runNodeWorker()

```ts
function runNodeWorker(scope?, options?): void;
```

Defined in: [packages/core/src/node/worker.ts:267](https://github.com/leifriksheim/minca/blob/main/core/src/node/worker.ts#L267)

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`](https://minca.dev/api/core/type-aliases/StoreFactory.md); \} | `{}` | - |
| `options.openStores?` | (`stores`) => [`StoreFactory`](https://minca.dev/api/core/type-aliases/StoreFactory.md) | `undefined` | Opens the stores the page described. Default `workerStores`; a test hands out memory ones. |

## Returns

`void`
