Vapor
From Coder Merlin
Revision as of 13:56, 15 January 2021 by Chukwuemeka-tinashe (talk | contribs) (Created page with "== Configuration == In the path: {{Pathname|./Sources/App/configure.swift}}: <syntaxhighlight lang="swift"> // Set local port guard let portString = Environment.get("IGIS_LOC...")
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder
Configuration[edit]
In the path: ./Sources/App/configure.swift:
// Set local port
guard let portString = Environment.get("IGIS_LOCAL_PORT") else {
fatalError("Failed to determine IGIS LOCAL PORT from environment")
}
guard let port = Int(portString) else {
fatalError("Malformed IGIS LOCAL PORT: \(portString)")
}
app.http.server.configuration.port = port
// Set local host
guard let hostname = Environment.get("IGIS_LOCAL_HOST") else {
fatalError("Failed to determine IGIS LOCAL HOST from environment")
}
app.http.server.configuration.hostname = hostname