DnsUpdater/Sources/App/entrypoint.swift

22 lines
454 B
Swift
Raw Normal View History

2024-11-15 10:46:29 +01:00
import Vapor
import Logging
@main
enum Entrypoint {
static func main() async throws {
var env = try Environment.detect()
try LoggingSystem.bootstrap(from: &env)
let app = Application(env)
defer { app.shutdown() }
do {
try await configure(app)
} catch {
app.logger.report(error: error)
throw error
}
try await app.execute()
}
}