Created
April 10, 2015 16:20
-
-
Save foliea/55ac1fe3962d4b9b595a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return _.mapValues({ca:'', cert:'', key:''}, (_value, cert) => { | |
let filepath = path.resolve(certPath, `${cert}.pem`); | |
return fs.readFileSync(filepath); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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