Middleware.shelf constructor
Middleware.shelf(})
The shelf
factory constructor is used to create a new instance of the Middleware class.
It accepts a shelf.Middleware
or a shelf.Handler
object.
It is used to create a middleware from a shelf middleware giving interoperability between Serinus and Shelf.
Implementation
factory Middleware.shelf(Function handler,
{List<String> routes = const ['*'], bool ignoreResponse = true}) {
return _ShelfMiddleware(handler,
routes: routes, ignoreResponse: ignoreResponse);
}