UNPKG

@softwarecitadel/girouette

Version:

An AdonisJS package allowing decorators-based routing.

34 lines (33 loc) 971 B
import 'reflect-metadata'; import type { ApplicationService } from '@adonisjs/core/types'; /** * The GirouetteProvider is responsible for registering all decorated routes with AdonisJS. * It scans the application's controllers directory and processes route decorators, * resource decorators, and group configurations. * * @example * ```ts * // In your adonisrc.ts * providers: [ * () => import('@adonisjs/core/providers/app_provider'), * () => import('./providers/girouette_provider') * ] * ``` */ export default class GirouetteProvider { #private; protected app: ApplicationService; constructor(app: ApplicationService); /** * Sets the path to the controllers */ set controllersPath(path: string); /** * Boot the provider when the application is ready */ boot(): Promise<void>; /** * Starts the provider by initializing the router and registering all routes */ start(): Promise<void>; }