Sesame-Server/Sources/Run/main.swift
2023-09-07 16:06:35 +02:00

16 lines
307 B
Swift

import App
import Vapor
var env = Environment.production //.detect()
try LoggingSystem.bootstrap(from: &env)
let app = Application(env)
defer { app.shutdown() }
private let semaphore = DispatchSemaphore(value: 0)
Task {
try await configure(app)
semaphore.signal()
}
semaphore.wait()
try app.run()