InitializerInitializerinit(root
init(rootDirectory:port:)
Creates a new preview server.
init(
rootDirectory: URL,
port: Int = 8080
)Parameters
rootDirectoryThe directory containing documentation files to serve. Should be an absolute path.
portThe TCP port to bind to (default: 8080). Must be in the range 1-65535, and not already in use.
Example
let server = PreviewServer(
rootDirectory: URL(fileURLWithPath: ".build/documentation"),
port: 8080
)