getServerOptions

View as MarkdownOpen in Claude

Create the options object needed by Node.js https.createServer().

Parameters

None.

Returns

{ cert: string; key: string } | null — An object with cert and key strings read from disk, or null if either file is missing.

Example

import { SslConfig } from '@signalwire/sdk';
const ssl = new SslConfig();
const opts = ssl.getServerOptions();
if (opts) {
const server = createServer(opts);
}