Classvapor 4.114.1Vapor
HTTPServer
HTTPServer.swift:16final class HTTPServer
final class HTTPServer
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
protocol Sendable
protocol Server : Sendable
init(application: Application, responder: Responder, configuration: Configuration, on eventLoopGroup: EventLoopGroup = MultiThreadedEventLoopGroup.singleton)
var configuration: Configuration { get set }
The configuration for the HTTP server.
var localAddress: SocketAddress? { get }
var onShutdown: EventLoopFuture<Void> { get }
func shutdown()
func shutdown() async
func start(address: BindAddress?) throws
func start(address: BindAddress?) async throws
struct Configuration
Engine server config struct.
func start() throws
Start the server with its default configuration, listening over a regular TCP socket.
func start(hostname: String?, port: Int?) throws
Start the server with the specified hostname and port, if provided. If left blank, the server will be started with its default configuration.