Structures
The following structures are available globally.
-
Manages an application’s
See moreEnvironment
such as.production
,.development
, and.testing
. Enables to create a customEnvironment
and provides access toEnvironment
variables.Declaration
Swift
public struct Environment
extension Environment: Equatable
-
Resolves a
See moreRoute
for aRequest
and calls its handler method. Returns a.notFound
Response
if it can’t match anyRoute
s. By default, theRoutingMiddleware
is already registered forChaqmoq
applications. If you override themiddleware
property, make sure you add it explicitly. Keep in mind that it is almost always better to register theRoutingMiddleware
at the end ofMiddleware
stack.Declaration
Swift
public struct RoutingMiddleware : Middleware