24 lines
526 B
Swift
Executable File
24 lines
526 B
Swift
Executable File
import App
|
|
import Vapor
|
|
|
|
var env = Environment.production
|
|
try LoggingSystem.bootstrap(from: &env)
|
|
let app = Application(env)
|
|
defer { app.shutdown() }
|
|
|
|
let storageFolder = URL(fileURLWithPath: app.directory.resourcesDirectory)
|
|
let logFolder = storageFolder.appendingPathComponent("logs")
|
|
print("Starting migration")
|
|
try migrate(folder: logFolder)
|
|
print("Finished migration")
|
|
/*
|
|
|
|
private let semaphore = DispatchSemaphore(value: 0)
|
|
Task {
|
|
try await configure(app)
|
|
semaphore.signal()
|
|
}
|
|
semaphore.wait()
|
|
try app.run()
|
|
*/
|