2022-01-23 20:49:06 +01:00
|
|
|
import App
|
|
|
|
import Vapor
|
|
|
|
|
2023-02-17 00:09:51 +01:00
|
|
|
var env = Environment.production //.detect()
|
2022-01-23 20:49:06 +01:00
|
|
|
try LoggingSystem.bootstrap(from: &env)
|
|
|
|
let app = Application(env)
|
|
|
|
defer { app.shutdown() }
|
2023-02-17 00:09:51 +01:00
|
|
|
|
2023-09-07 15:33:10 +02:00
|
|
|
let storageFolder = URL(fileURLWithPath: app.directory.resourcesDirectory)
|
|
|
|
let logFolder = storageFolder.appendingPathComponent("logs")
|
|
|
|
print("Starting migration")
|
|
|
|
try migrate(folder: logFolder)
|
|
|
|
print("Finished migration")
|
|
|
|
/*
|
2023-02-17 00:09:51 +01:00
|
|
|
private let semaphore = DispatchSemaphore(value: 0)
|
|
|
|
Task {
|
|
|
|
try await configure(app)
|
|
|
|
semaphore.signal()
|
|
|
|
}
|
|
|
|
semaphore.wait()
|
2022-01-23 20:49:06 +01:00
|
|
|
try app.run()
|
2023-09-07 15:33:10 +02:00
|
|
|
*/
|