LogoRobo.js
Framework

NestingConfig

Interface: NestingConfig

Configuration for nested directory handling.

Properties

PropertyTypeDescription
allowIndex?booleanWhether index.ts files create handlers for their parent directory. - true: /src/api/users/index.ts → "users" - false: index.ts files are ignored Default true
catchAllSegment?RegExpRegex pattern for catch-all route segments. Matches remaining path segments into an array. Default /^\[\.\.\.([^\]]+)\]$/ matches [...path], [...slug] Example /api/auth/[...path].ts matches /api/auth/a/b/c
dynamicSegment?RegExpRegex pattern for dynamic route segments. Matched groups become route parameters. Default /^\[([^\]]+)\]$/ matches [id], [slug], etc.
maxDepth?numberMaximum allowed directory depth. Example 3 allows /src/commands/a/b/c.ts but not deeper
optionalCatchAll?RegExpRegex pattern for optional catch-all segments. Like catch-all but also matches the base path. Default /^\[\[\.\.\.([^\]]+)\]\]$/ matches [[...slug]] Example /api/docs/[[...slug]].ts matches /api/docs AND /api/docs/a/b

On this page