# configuration/configs/route.config.ts

> 25 lines of code and 4 definitions.

Tree: Project Scripts
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/scripts#file-scripts-configuration-configs-route-config-ts
Source text: https://banes-lab.com/source/scripts/configuration/configs/route.config.ts.txt

Listed in [configuration/configs](https://banes-lab.com/api/source/scripts/configuration/configs.md), after [configuration/configs/rate.config.ts](https://banes-lab.com/source/scripts/configuration/configs/rate.config.ts.md) and before [configuration/configs/snapshot.config.ts](https://banes-lab.com/source/scripts/configuration/configs/snapshot.config.ts.md).

## Definitions

- `LISTEN_TIMEOUT_MS` (lexical_declaration, line 3, exported)
- `LISTEN_POLL_MS` (lexical_declaration, line 5, exported)
- `LOCAL_ORIGIN` (lexical_declaration, line 7, exported)
- `CAPTURE_ARGV` (lexical_declaration, line 9, exported)

## Contained in

- [configuration/configs](https://banes-lab.com/anatomy/scripts/folder-scripts-configuration-configs.md)

## Source

```typescript
import type { ArgvSpec } from "@govlab/argv";

export const LISTEN_TIMEOUT_MS = 180_000;

export const LISTEN_POLL_MS = 250;

export const LOCAL_ORIGIN = "https://localhost:";

export const CAPTURE_ARGV: ArgvSpec = {
    command: "npm run capture --",
    flags: [
        {
            describe: "a site route to capture, such as / or /anatomy/tree; required",
            name: "--route",
            repeatable: true,
            takesValue: true,
        },
        {
            describe: "the folder that receives one png and one console log per route; required",
            name: "--out-dir",
            takesValue: true,
        },
        { describe: "the chrome or edge binary; detected when absent", name: "--browser", takesValue: true },
        { describe: "milliseconds to let each page settle", name: "--settle", takesValue: true },
        { describe: "render on the gpu instead of in software", name: "--gpu", takesValue: false },
    ],
    summary:
        "Start the dev server on its declared port, capture a screenshot and a console log for each route, and stop the server it started. Refuses when anything already holds the port, because a process this tool did not start is never its to stop.",
};
```
