mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 06:34:39 -04:00
refactor(config.js): Extract config file
* Separate different config source to each files * Freeze config object
This commit is contained in:
parent
4738ba7d36
commit
ecb0533605
15 changed files with 767 additions and 618 deletions
17
lib/config/defaultSSL.js
Normal file
17
lib/config/defaultSSL.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
'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')
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue