RouteConfiguration class

An object containing all route configuration metadata required to generate a dart frog server.

Constructors

RouteConfiguration({required List<MiddlewareFile> middleware, required List<RouteDirectory> directories, required List<RouteFile> routes, required Map<String, List<RouteFile>> endpoints, required List<RouteFile> rogueRoutes, MiddlewareFile? globalMiddleware, bool serveStaticFiles = false, bool invokeCustomEntrypoint = false, bool invokeCustomInit = false})
An object containing all route configuration metadata required to generate a dart frog server.
const

Properties

directories List<RouteDirectory>
List of all route directories. Sorted from leaf nodes to root.
final
endpoints Map<String, List<RouteFile>>
A map of all endpoint paths to resolved route files.
final
globalMiddleware MiddlewareFile?
Optional global middleware.
final
hashCode int
The hash code for this object.
no setterinherited
invokeCustomEntrypoint bool
Whether to invoke a custom entrypoint script (main.dart).
final
invokeCustomInit bool
Whether to invoke a custom init method (init in main.dart).
final
middleware List<MiddlewareFile>
List of all nested middleware. Top-level middleware is excluded (see globalMiddleware).
final
rogueRoutes List<RouteFile>
List of all rogue routes.
final
routes List<RouteFile>
List of all route files.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serveStaticFiles bool
Whether to serve static files. Defaults to false.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Transform into json
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited