Update to swift 6

This commit is contained in:
2025-05-12 19:45:46 -07:00
parent 704ca27cd7
commit 75eddcb6fd
6 changed files with 112 additions and 55 deletions

View File

@@ -1,9 +1,18 @@
import App
import Vapor
import Logging
var env = try Environment.detect()
try LoggingSystem.bootstrap(from: &env)
let app = Application(env)
defer { app.shutdown() }
try configure(app)
try app.run()
let app = try await Application.make(env)
do {
try configure(app)
try await app.execute()
} catch {
app.logger.report(error: error)
try? await app.asyncShutdown()
throw error
}
try await app.asyncShutdown()