# ServerRouter

Builds an SSR Router Layer from an in-memory history snapshot or initial URL.

## Signatures

```ts
export declare const ServerRouter: (options: MemoryOptions | InitialMemoryOptions) => Layer.Layer<Router, NavigationError>;
```

## Why

Server rendering can run the exact matcher program without evaluating browser globals.

## Ownership and lifetime

Layer acquisition owns memory history, random Uuid7State, and the root CurrentRoute until the Layer Scope
closes. Identifier and navigation failures remain in `NavigationError`.

## Examples

```ts
import * as Router from "@typed/router"

const RouterLive = Router.ServerRouter({ url: "https://example.com/products" })
```
