2020-05-17 20:01:30 +02:00
|
|
|
import App
|
|
|
|
import Vapor
|
|
|
|
|
2023-02-06 21:31:12 +01:00
|
|
|
var env = Environment.production
|
2020-09-20 11:36:35 +02:00
|
|
|
try LoggingSystem.bootstrap(from: &env)
|
|
|
|
let app = Application(env)
|
|
|
|
defer { app.shutdown() }
|
2023-02-16 23:08:58 +01:00
|
|
|
|
2023-02-16 23:33:19 +01:00
|
|
|
private let semaphore = DispatchSemaphore(value: 0)
|
2023-02-16 23:08:58 +01:00
|
|
|
Task {
|
|
|
|
try await configure(app)
|
|
|
|
semaphore.signal()
|
|
|
|
}
|
|
|
|
semaphore.wait()
|
2020-09-20 11:36:35 +02:00
|
|
|
try app.run()
|