Chaqmoq
public final class Chaqmoq : TrieRouter
Helps to create, run, and shut down Chaqmoq
applications.
-
The current application’s
Configuration
.Declaration
Swift
public let configuration: Configuration
-
The current application’s
Environment
.Declaration
Swift
public let environment: Environment
-
The current application’s
EventLoopGroup
.Declaration
Swift
public var eventLoopGroup: EventLoopGroup { get }
-
A list of registered
Middleware
.Declaration
Swift
public var middleware: [Middleware] { get set }
-
The current application’s dependency injection container for services.
Declaration
Swift
public let resolver: Resolver
-
Initializes a new instance of
Chaqmoq
application.Declaration
Swift
public init( configuration: Configuration = .init(), environment: Environment = .init(), resolver: Resolver = .main )
Parameters
configuration
A
Configuration
for an application.environment
An
Environment
for an application. Defaults to.development
.resolver
An application’s dependency injection container for services. Defaults to
.main
. -
Runs an application.
Throws
An error if an application can’t be run.Declaration
Swift
public func run() throws
-
Shuts down an application.
Throws
An error if an application can’t be shut down.Declaration
Swift
public func shutdown() throws
-
Manages an application’s
See moreConfiguration
.Declaration
Swift
public struct Configuration : Equatable