server = HttpsServer.create(new InetSocketAddress(port), 0);
} else {
server = HttpsServer.create(new InetSocketAddress(host, port), 0);
}
final SSLContext sslContext = getSslContext(config.getKeystore(), config.getKeyStorePassword());
final HttpsConfigurator configurator = getConfigurator(sslContext);
((HttpsServer)server).setHttpsConfigurator(configurator);
final RequestLimiter limiter = getRequestLimiterOrNull(config);
final LinkedBlockingQueue<Runnable> workQueue = new LinkedBlockingQueue<>();
httpHandler = new LanguageToolHttpHandler(config.isVerbose(), allowedIps, runInternally, limiter, workQueue);
httpHandler.setMaxTextLength(config.getMaxTextLength());