Skip to content

Instantly share code, notes, and snippets.

@foliea
Created April 10, 2015 16:20
Show Gist options
  • Save foliea/55ac1fe3962d4b9b595a to your computer and use it in GitHub Desktop.
Save foliea/55ac1fe3962d4b9b595a to your computer and use it in GitHub Desktop.
return _.mapValues({ca:'', cert:'', key:''}, (_value, cert) => {
let filepath = path.resolve(certPath, `${cert}.pem`);
return fs.readFileSync(filepath);
});
let certs = {};
for (let cert of ['ca', 'cert', 'key']) {
let filepath = path.resolve(certPath, `${cert}.pem`);
certs[cert] = fs.readFileSync(filepath);
}
return certs;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment