Listen on IPv4 port 43112 by default

This commit is contained in:
SantaSpeen committed 2026-11-22 03:40:06 +03:00
1 parent 4801cfbe77
commit 0aad4f27eb
6 files changed
+44 -13

No files matched your search

@@ -2,12 +2,13 @@ import Foundation
import Security
struct ServerConfiguration {
static let defaultPort: UInt16 = 43112
let store: ServerStore
let token: String
let port: UInt16
init(environment: [String: String] = ProcessInfo.processInfo.environment, imagesParent: URL? = nil) throws {
let rawPort = environment["EZSERVER_PORT"] ?? "55005"
let rawPort = environment["EZSERVER_PORT"] ?? String(Self.defaultPort)
guard let port = UInt16(rawPort), port > 0 else { throw Failure.invalidPort }
self.port = port
let directory: URL