Skip to content

Instance Method

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.
func startup() async throws

Discussion

If you start Vapor through this method, you’ll need to prevent your Swift Executable from closing yourself. If you want to run your Application indefinitely, or until your code shuts the application down, use execute() instead.