[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Task](https://evolu.dev/docs/api-reference/common/Task) › createRun

```ts
const createRun: CreateRun;
```

Defined in: [packages/common/src/Task.ts:2182](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Task.ts#L2182)

Creates a root [DisposableRun](https://evolu.dev/docs/api-reference/common/Task/interfaces/DisposableRun).

Use at composition roots such as app, server, worker, or test entry points.
The common factory is platform-agnostic; platform adapters can wrap it to add
global error handling or shutdown integration.

### Example

```ts

interface ConfigDep {
  readonly config: { readonly apiUrl: string };
}

const loadApiUrl: Task<string, never, ConfigDep> = (run) =>
  ok(run.deps.config.apiUrl);

await using run = createRun({
  config: { apiUrl: "https://api.example.com" },
});
assertOk(await run(loadApiUrl), "https://api.example.com");
```