diff options
author | Christoph (Sheogorath) Kern | 2018-06-26 21:38:02 +0200 |
---|---|---|
committer | GitHub | 2018-06-26 21:38:02 +0200 |
commit | 6634fac84964d4f292599a9f368c182e6f10045c (patch) | |
tree | d93e6a6574ad972a27b372fc12e0539b57ca8868 /lib/config/index.js | |
parent | d87505d5836ea1bad60c0e2c2a8aa25b9b4e1590 (diff) | |
parent | 2184491f4ac4b224e26fcc4b54d792dd4e82178f (diff) |
Merge pull request #850 from SISheogorath/rebrand/CodiMD
Rebrand HackMD CE to CodiMD
Diffstat (limited to '')
-rw-r--r-- | lib/config/index.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/config/index.js b/lib/config/index.js index 79330443..8705b10b 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -33,6 +33,7 @@ merge(config, debugConfig) merge(config, packageConfig) merge(config, fileConfig) merge(config, require('./oldEnvironment')) +merge(config, require('./hackmdEnvironment')) merge(config, require('./environment')) merge(config, require('./dockerSecret')) @@ -122,6 +123,11 @@ for (let i = keys.length; i--;) { } } +// Notify users about the prefix change and inform them they use legacy prefix for environment variables +if (Object.keys(process.env).toString().indexOf('HMD_') !== -1) { + logger.warn('Using legacy HMD prefix for environment variables. Please change your variables in future. For details see: https://github.com/hackmdio/codimd#environment-variables-will-overwrite-other-server-configs') +} + // Generate session secret if it stays on default values if (config.sessionSecret === 'secret') { logger.warn('Session secret not set. Using random generated one. Please set `sessionSecret` in your config.js file. All users will be logged out.') @@ -169,7 +175,7 @@ config.tmpPath = path.join(appRootPath, config.tmpPath) config.defaultNotePath = path.join(appRootPath, config.defaultNotePath) config.docsPath = path.join(appRootPath, config.docsPath) config.indexPath = path.join(appRootPath, config.indexPath) -config.hackmdPath = path.join(appRootPath, config.hackmdPath) +config.codimdPath = path.join(appRootPath, config.codimdPath) config.errorPath = path.join(appRootPath, config.errorPath) config.prettyPath = path.join(appRootPath, config.prettyPath) config.slidePath = path.join(appRootPath, config.slidePath) |