diff --git a/Sources/App/ServerStatus.swift b/Sources/App/ServerStatus.swift index 93bfcb0..c19e1ae 100644 --- a/Sources/App/ServerStatus.swift +++ b/Sources/App/ServerStatus.swift @@ -9,4 +9,6 @@ enum ServerStatus: Int, Codable { case pushFailed = 2 case starting = 3 + + case failedToStart = 4 } diff --git a/Sources/App/configure.swift b/Sources/App/configure.swift index bbcef50..4f00e12 100644 --- a/Sources/App/configure.swift +++ b/Sources/App/configure.swift @@ -23,13 +23,14 @@ public func configure(_ app: Application) throws { let data = try Data(contentsOf: configUrl) config = try JSONDecoder().decode(from: data) } catch { - print("Failed to load config: \(error)") + print("Failed to load config from \(configUrl.path): \(error)") return } app.http.server.configuration.port = config.port guard configureAPNS(config) else { + serverStatus = .failedToStart return }