ts: lib/config/index.js

Signed-off-by: Raccoon <raccoon@hackmd.io>
This commit is contained in:
Raccoon 2021-06-12 07:23:25 +08:00
parent 6696a0ab74
commit 5ba1a41c6d
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38

View File

@ -32,7 +32,7 @@ const configFilePath = path.resolve(appRootPath, process.env.CMD_CONFIG_FILE ||
'config.json')
const fileConfig = fs.existsSync(configFilePath) ? require(configFilePath)[env] : undefined
let config = require('./default')
let config: any = require('./default')
merge(config, require('./defaultSSL'))
merge(config, debugConfig)
merge(config, packageConfig)
@ -209,6 +209,6 @@ config.docsPath = path.resolve(appRootPath, config.docsPath)
config.uploadsPath = path.resolve(appRootPath, config.uploadsPath)
// make config readonly
config = deepFreeze(config)
config = deepFreeze(config) as any
module.exports = config
export = config