Framework
RouteConfig
Interface: RouteConfig
Configuration for a route definition. Each route tells Robo.js how to scan a directory and process its files.
Note: The directory to scan is inferred from the route filename. /src/robo/routes/commands.ts → scans /src/commands/
Properties
| Property | Type | Description |
|---|---|---|
description? | string | Human-readable description for documentation. |
exports? | ExportsConfig | Configuration for which exports to capture from handler files. Enables named exports like GET, POST, etc. |
filter? | RegExp | Regex pattern to filter files. Non-matching files are excluded from scanning. Example /^(?!_)/ excludes files starting with underscore |
key | KeyConfig | Configuration for generating handler keys from file paths. |
multiple? | boolean | If true, multiple handlers can share the same key. Used for events where multiple listeners are common. Default false |
nesting? | NestingConfig | Configuration for handling nested directories. |
singular? | string | Singular accessor name for portal controller access. Used to derive the singular form of the route name for controller factories. Example "command" for "commands", "contextMenu" for "context" Default Derived by removing trailing 's' from route name |
