willBootAsync(_:)
LifecycleHandler.swift:63func willBootAsync(_ application: Application) async throws
func willBootAsync(_ application: Application) async throws
s5Vapor16LifecycleHandlerPAAE13willBootAsyncyyAA11ApplicationCYaKF
What are these?4B6QH
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
protocol LifecycleHandler : Sendable
Provides a way to hook into lifecycle events of a Vapor application. You can register your handlers with the Application
to be notified when the application is about to start up, has started up and is about to shutdown
final class Application
Core type representing a Vapor application.
func willBootAsync(_ application: Application) async throws
Called when the application is about to boot up. This is the asynchronous version of willBoot(_:)
. When adopting the async APIs you should ensure you provide a compatitble implementation for willBoot(_:)
as well if you want to support older users still running in a non-async context Note your application must be running in an asynchronous context and initialised with make(_:_:)
for this handler to be called
func willBoot(_ application: Application) throws
func didBoot(_ application: Application) throws
func didBootAsync(_ application: Application) async throws
func shutdown(_ application: Application)
func shutdownAsync(_ application: Application) async