Server(string, int, bool, string, bool, IReadOnlyDictionary<string, string>, IReadOnlyDictionary<string, string>, IEnumerable<ILoggerProvider>) Constructor
Creates the HTTP server.
Namespace
Statiq.Web.Hosting
Containing Type
Server

Syntax

public Server(string localPath, int port, bool extensionless, string virtualDirectory, bool liveReload, IReadOnlyDictionary<string, string> contentTypes, IReadOnlyDictionary<string, string> customHeaders, IEnumerable<ILoggerProvider> loggerProviders)

Parameters

Name Type Description
localPath string The local path to serve files from.
port int The port the server will serve HTTP requests on.
extensionless bool true if the server should support extensionless URLs, false otherwise.
virtualDirectory string The virtual directory the server should respond to, or null to use the root URL.
liveReload bool Enables support for LiveReload.
contentTypes IReadOnlyDictionary<string, string> Additional content types the server should support.
customHeaders IReadOnlyDictionary<string, string> Custom headers that will be added to every response.
loggerProviders IEnumerable<ILoggerProvider> The logger providers to use.