DSShelfCore class
Core DSL for building a ds_shelf-powered server with middleware and routing.
- Implementers
Constructors
- DSShelfCore()
- Initialize core middleware and server configurations.
Properties
Methods
-
addFileBasedRoutes(
String routesDirectory, {String baseRoute = '/', bool recursive = true, required DSFileRouteHandlerFactory handlerFactory}) → void -
Registers routes discovered from files in
routesDirectory. -
addGetRoute(
String path, Handler handler) → void - Utility to register a GET route easily.
-
addMiddleware(
Middleware middleware) → void - Adds a middleware to the pipeline.
-
addPostRoute(
String path, Handler handler) → void - Utility to register a POST route easily.
-
addStaticRoute(
String fileSystemPath, {String routePath = '/'}) → void - Registers a static file handler.
-
addWebSocketRoute(
String path, Handler handler) → void - Registers a WebSocket route.
-
mount(
String path, Handler handler) → void - Mounts a handler at a specific path.
-
mountRouter(
String path, Router router) → void - Mounts a child Router at a specific path prefix.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
printRoutes(
) → void - Prints all registered routes to the console.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited