diff --git a/docs/advanced/server.md b/docs/advanced/server.md index eb330f69..dea3c686 100644 --- a/docs/advanced/server.md +++ b/docs/advanced/server.md @@ -141,7 +141,7 @@ The `tlsConfiguration` parameter controls whether TLS (SSL) is enabled on the se // Enable TLS. app.http.server.configuration.tlsConfiguration = .makeServerConfiguration( certificateChain: try NIOSSLCertificate.fromPEMFile("/path/to/cert.pem").map { .certificate($0) }, - privateKey: .file("/path/to/key.pem") + privateKey: try NIOSSLPrivateKey(file: "/path/to/key.pem", format: .pem)) ) ```