parcel-bundler
Version:
Blazing fast, zero configuration web application bundler
14 lines (11 loc) • 317 B
JavaScript
const fs = require('@parcel/fs');
async function getCertificate(options) {
try {
let cert = await fs.readFile(options.cert);
let key = await fs.readFile(options.key);
return {key, cert};
} catch (err) {
throw new Error('Certificate and/or key not found');
}
}
module.exports = getCertificate;