Class
Application
Core type representing a Vapor application.
final class Application
Topics
Classes
Structures
Application.CachesApplication.ClientsApplication.CoreApplication.HTTPApplication.LifecycleApplication.PasswordApplication.PasswordsApplication.ResponderApplication.RunningApplication.ServersApplication.ServiceApplication.ServicesApplication.SessionsApplication.Views
Initializers
Instance Properties
allocatorasyncCommandscacheCurrent application cache. SeeRequest.cachefor caching in request handlers.cachesControls application’s configured caches.clientclientscommandsconsoledidShutdowndirectoryenvironmenteventLoopGroupeventLoopGroupProviderfileiohttplifecyclelocksloggermiddlewarepasswordpasswordsresponderroutesrunningserverserversservicessessionsstoragesyncthreadPoolThe application thread pool. Vapor usesNIOSingletons.posixBlockingThreadPoolby default for this, which defaults to a thread pool of size equal to the number of available cores.traceAutoPropagationIf enabled, tracing propagation is automatically handled by restoring & settingrequest.serviceContextautomatically across Vapor-internal EventLoopFuture boundaries. If disabled, traces will not automatically nest, and the user should restore & setrequest.serviceContextmanually where needed. There are performance implications to enabling this feature.viewviews
Instance Methods
asyncBoot()Called when the applications starts up, will trigger the lifecycle handlers. The asynchronous version ofboot()asyncShutdown()boot()execute()Starts theApplicationasynchronous using thestartup()method, then waits for any running tasks to complete. If your application is started without arguments, the default argument is used.run()Starts theApplicationusing thestart()method, then waits for any running tasks to complete. If your application is started without arguments, the default argument is used.shutdown()start()When called, this will execute the startup command provided through an argument. If no startup command is provided, the default is used. Under normal circumstances, this will start running Vapor’s webserver.startup()When called, this will asynchronously execute the startup command provided through an argument. If no startup command is provided, the default is used. Under normal circumstances, this will start running Vapor’s webserver.
Type Methods
Enumerations
Default Implementations
Relationships
Conforms To
RoutesBuilderSwift.CopyableSwift.EscapableSwift.SendableSwift.SendableMetatype