UNPKG

@gent-js/gent

Version:

template-based data generator.

14 lines (13 loc) 509 B
import * as tls from "node:tls"; export async function createTlsOutput(outputOptions) { const tlsOptions = { host: outputOptions.address, port: outputOptions.port, rejectUnauthorized: false, // key: fs.readFileSync(path.join(__dirname, 'client-key.pem')), // cert: fs.readFileSync(path.join(__dirname, 'client-cert.pem')), // ca: [fs.readFileSync(path.join(__dirname, 'ca-cert.pem'))] }; const client = tls.connect(tlsOptions); return client; }