Instance Methodvapor 4.106.2Vapor
execute
Starts the Application
asynchronous using the startup
method, then waits for any running tasks to complete. If your application is started without arguments, the default argument is used.
func execute() async throws
Under normal circumstances, execute
runs until a shutdown is triggered, then wait for the web server to (manually) shut down before returning.
Other members in extension
Types
struct Caches
struct Clients
struct Core
enum EventLoopGroupProvider
struct HTTP
struct Lifecycle
class Locks
struct Password
struct Passwords
struct Responder
struct Running
struct Servers
struct Sessions
struct Views
Type members
init(Environment, EventLoopGroupProvider
) static func make(Environment, EventLoopGroupProvider
) async throws -> Application
Instance members
var allocator: ByteBufferAllocator
var asyncCommands: AsyncCommands
var cache: Cache
Current application cache. See
Request.cache
for caching in request handlers.var caches: Caches
Controls application’s configured caches.
var client: Client
var clients: Clients
var commands: Commands
var console: Console
var didShutdown: Bool
var directory: DirectoryConfiguration
var environment: Environment
let eventLoopGroup: EventLoopGroup
let eventLoopGroupProvider: EventLoopGroupProvider
var fileio: NonBlockingFileIO
var http: HTTP
var lifecycle: Lifecycle
var locks: Locks
var logger: Logger
var middleware: Middlewares
var password: Password
var passwords: Passwords
var responder: Responder
var routes: Routes
var running: Running?
var server: Server
var servers: Servers
var sessions: Sessions
var storage: Storage
var sync: NIOLock
var threadPool: NIOThreadPool
The application thread pool. Vapor provides a thread pool with 64 threads by default.
var view: ViewRenderer
var views: Views
func add(Route
) func asyncBoot(
) async throws Called when the applications starts up, will trigger the lifecycle handlers. The asynchronous version of
boot
func asyncShutdown(
) async throws func boot(
) throws func run(
) throws Starts the
Application
using thestart
method, then waits for any running tasks to complete. If your application is started without arguments, the default argument is used.func shutdown(
) func start(
) throws 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.
func startup(
) async throws 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.