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
1919
2020
2121@discardableResult
22- public func configure( _ app: Application ) async throws -> String {
22+ public func configure( _ app: Application , databasePort : Int ? = nil ) async throws -> String {
2323 #if DEBUG && os(macOS)
2424 // The bundle is only loaded if /Applications/InjectionIII.app exists on the local development machine.
2525 // 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 {
5555 // Setup database connection
5656 guard
5757 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) ,
5959 let username = Environment . get ( " DATABASE_USERNAME " ) ,
6060 let password = Environment . get ( " DATABASE_PASSWORD " ) ,
6161 let database = Environment . get ( " DATABASE_NAME " )
You can’t perform that action at this time.
0 commit comments