2021-11-25 19:15:38 +01:00
|
|
|
import App
|
|
|
|
import Vapor
|
|
|
|
|
|
|
|
var env = try Environment.detect()
|
|
|
|
try LoggingSystem.bootstrap(from: &env)
|
|
|
|
let app = Application(env)
|
|
|
|
defer { app.shutdown() }
|
2023-02-16 19:01:10 +01:00
|
|
|
|
2023-02-16 23:33:39 +01:00
|
|
|
private let semaphore = DispatchSemaphore(value: 0)
|
2023-02-16 18:31:30 +01:00
|
|
|
Task {
|
|
|
|
try await configure(app)
|
2023-02-16 19:01:10 +01:00
|
|
|
semaphore.signal()
|
2023-02-16 18:31:30 +01:00
|
|
|
}
|
2023-02-16 19:01:10 +01:00
|
|
|
semaphore.wait()
|
|
|
|
try app.run()
|