Vapor

From Coder Merlin
Jump to navigation Jump to search

Getting Started[edit]

vapor new hello -n

Configuration[edit]

In the path: ./Sources/App/configure.swift:

// Set local port
guard let portString = Environment.get("VAPOR_LOCAL_PORT"),
      let port = Int(portString) else {
    fatalError("Failed to determine VAPOR LOCAL PORT from environment")
}
app.http.server.configuration.port = port

// Set local host
guard let hostname = Environment.get("VAPOR_LOCAL_HOST") else {
    fatalError("Failed to determine VAPOR LOCAL HOST from environment")
}
app.http.server.configuration.hostname = hostname

References[edit]

Fluent[edit]


CoderMerlin™ proudly recommends:
HintIcon.png

Your purchase via these links helps to keep  Coder Merlin™ 's orbuculum ablaze. Thank you for your support!


Designed with pride in Silicon Valley, CA, USA