File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import Vapor
19
19
20
20
21
21
@discardableResult
22
- public func configure( _ app: Application ) async throws -> String {
22
+ public func configure( _ app: Application , databasePort : Int ? = nil ) async throws -> String {
23
23
#if DEBUG && os(macOS)
24
24
// The bundle is only loaded if /Applications/InjectionIII.app exists on the local development machine.
25
25
// Requires InjectionIII 4.7.3 or higher to be loaded for compatibility with Package.swift files.
@@ -55,7 +55,7 @@ public func configure(_ app: Application) async throws -> String {
55
55
// Setup database connection
56
56
guard
57
57
let host = Environment . get ( " DATABASE_HOST " ) ,
58
- let port = Environment . get ( " DATABASE_PORT " ) . flatMap ( Int . init) ,
58
+ let port = databasePort ?? Environment . get ( " DATABASE_PORT " ) . flatMap ( Int . init) ,
59
59
let username = Environment . get ( " DATABASE_USERNAME " ) ,
60
60
let password = Environment . get ( " DATABASE_PASSWORD " ) ,
61
61
let database = Environment . get ( " DATABASE_NAME " )
You can’t perform that action at this time.
0 commit comments