hedgedoc/lib/config/defaultSSL.js
BoHong Li ecb0533605 refactor(config.js): Extract config file
* Separate different config source to each files
* Freeze config object
2017-05-08 19:29:07 +08:00

17 lines
350 B
JavaScript

'use strict'
const fs = require('fs')
function getFile (path) {
if (fs.existsSync(path)) {
return path
}
return undefined
}
module.exports = {
sslkeypath: getFile('/run/secrets/key.pem'),
sslcertpath: getFile('/run/secrets/cert.pem'),
sslcapath: getFile('/run/secrets/ca.pem'),
dhparampath: getFile('/run/secrets/dhparam.pem')
}