16 lines
297 B
Swift
16 lines
297 B
Swift
import App
|
|
import Vapor
|
|
|
|
var env = try Environment.detect()
|
|
try LoggingSystem.bootstrap(from: &env)
|
|
let app = Application(env)
|
|
defer { app.shutdown() }
|
|
|
|
private let semaphore = DispatchSemaphore(value: 1)
|
|
Task {
|
|
try await configure(app)
|
|
semaphore.signal()
|
|
}
|
|
semaphore.wait()
|
|
try app.run()
|