Instance Method (Default implementation)vapor 4.114.1Vapor

start(hostname:port:)

Start the server with the specified hostname and port, if provided. If left blank, the server will be started with its default configuration.

Server.swift:65

This declaration has been renamed to start(address:).

This declaration is deprecated: Please use `start(address: .hostname(hostname, port: port))` instead

func start(hostname: String?, port: Int?) throws

Parameters

hostname

The hostname to start the server with, or nil if the default one should be used.

port

The port to start the server with, or nil if the default one should be used.

  • Deprecated: Please use start(address: .hostname(hostname, port: port)) instead.