LogoRobo.js
Packages@robojs/server

PluginPrefixConfig

Type Alias: PluginPrefixConfig

type PluginPrefixConfig = 
  | string
  | {
  api: string | false;
  exclusive: boolean;
  static: string | false;
};

Plugin prefix configuration - supports both simple string and granular object.

Examples:

  • '/mock' - Both API and static under /mock/* (exclusive by default)
  • { api: '/mock-api', static: '/mock-static' } - Separate prefixes
  • { api: '/other', static: false } - API prefixed, static at root
  • { api: '/mock', exclusive: false } - Both prefixed and non-prefixed routes work

Type declaration

string

{ api: string | false; exclusive: boolean; static: string | false; }

NameTypeDescription
api?string | false-
exclusive?booleanWhether routes are ONLY accessible via the prefix (default: true). - true: Only /mock/api/health works, /api/health returns 404 - false: Both /mock/api/health and /api/health work
static?string | false-

On this page