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

handler → Handler
Composed handler with all registered middleware and routes.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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