November 2018
Intermediate to advanced
404 pages
10h 16m
English
The boot() function in boot.swift is called after the application is created and initialized. You can conveniently add your own initialization code to this function.
For any services that need to be set up before the application is created, you need to put their initialization code in the configure() function instead:
// File: /Sources/App/boot.swiftimport Vapor/// Called after your application has initialized.public func boot(_ app: Application) throws {// your code here}At this moment, the boot() function doesn't do too much—it simply provides a placeholder for you to add initialization code later.
Read now
Unlock full access