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

1import { SslConfig } from '@signalwire/sdk';
2
3const ssl = new SslConfig();
4const opts = ssl.getServerOptions();
5if (opts) {
6 const server = createServer(opts);
7}