SwiftarrConfigurator
struct SwiftarrConfigurator
Launching Swiftarr
Environment
Besides the standard .development, .production, and .testing, there’s a few custom environment values that can be set, either on the command line
with --env <ENVIRONMENT>
or with the VAPOR_ENV
environment variable
Environment variables used by Swiftarr:
- DATABASE_URL:
- DATABASE_HOSTNAME:
- DATABASE_PORT:
- DATABASE_DB:
- DATABASE_USER:
DATABASE_PASSWORD:
REDIS_URL:
REDIS_HOSTNAME:
PORT:
hostname:
ADMIN_PASSWORD:
RECOVERY_KEY:
SWIFTARR_USER_IMAGES: Root directory for storing user-uploaded images. These images are referenced by filename in the db.
SWIFTARR_EXTERNAL_URL: Externally-visible URL to get to the server. The server uses this to create URLs pointing to itself.
-
Declaration
Swift
var configLog: <<error type>>
-
Declaration
Swift
var app: Application
-
Declaration
Swift
init(_ app: Application)
-
configure()
AsynchronousCalled before your application initializes. Calls several other config methods to do its work. Sub functions are only here for easier organization. If order-of-initialization issues arise, rearrange as necessary.
Declaration
Swift
public func configure() async throws
-
postBootConfigure()
AsynchronousDeclaration
Swift
func postBootConfigure() async throws
-
Declaration
Swift
func configureBundle(_ app: Application) throws
-
Declaration
Swift
func configureBasicSettings(_ app: Application) throws
-
Declaration
Swift
func databaseConnectionConfiguration(_ app: Application) throws
-
Declaration
Swift
func configureStoredSettings(_ app: Application) throws
-
Declaration
Swift
func configureHTTPServer(_ app: Application) throws
-
Declaration
Swift
func configureAPIURL(_ app: Application) throws
-
Declaration
Swift
func configureMiddleware(_ app: Application) throws
-
Declaration
Swift
func configureSessions(_ app: Application) throws
-
Declaration
Swift
func configureLeaf(_ app: Application) throws
-
Declaration
Swift
func configureQueues(_ app: Application) throws
-
Declaration
Swift
func configurePrometheus(_ app: Application) throws
-
Declaration
Swift
func configureMigrations(_ app: Application) throws
-
verifyConfiguration(_:
Asynchronous) Declaration
Swift
func verifyConfiguration(_ app: Application) async throws
-
Declaration
Swift
func operatingSystemPlatform() -> String?
-
Declaration
Swift
func configureCommands(_ app: Application)