removing superfluous config parameters for template files

Signed-off-by: Claudius <opensource@amenthes.de>
This commit is contained in:
Claudius
2018-09-10 22:35:38 +02:00
committed by WilliButz
parent 825ee4e66e
commit bb80bc2292
5 changed files with 11 additions and 22 deletions

View File

@@ -38,15 +38,10 @@ module.exports = {
sslCAPath: '',
dhParamPath: '',
// other path
viewPath: './public/views',
tmpPath: './tmp',
defaultNotePath: './public/default.md',
docsPath: './public/docs',
indexPath: './public/views/index.ejs',
codimdPath: './public/views/codimd.ejs',
errorPath: './public/views/error.ejs',
prettyPath: './public/views/pretty.ejs',
slidePath: './public/views/slide.ejs',
constantsPath: './public/js/lib/common/constant.ejs',
uploadsPath: './public/uploads',
// session
sessionName: 'connect.sid',

View File

@@ -9,7 +9,7 @@ const deepFreeze = require('deep-freeze')
const {Environment, Permission} = require('./enum')
const logger = require('../logger')
const appRootPath = path.join(__dirname, '../../')
const appRootPath = path.resolve(__dirname, '../../')
const env = process.env.NODE_ENV || Environment.development
const debugConfig = {
debug: (env === Environment.development)
@@ -177,16 +177,10 @@ config.sslCAPath.forEach(function (capath, i, array) {
config.sslCertPath = path.resolve(appRootPath, config.sslCertPath)
config.sslKeyPath = path.resolve(appRootPath, config.sslKeyPath)
config.dhParamPath = path.resolve(appRootPath, config.dhParamPath)
config.viewPath = path.resolve(appRootPath, config.viewPath)
config.tmpPath = path.resolve(appRootPath, config.tmpPath)
config.defaultNotePath = path.resolve(appRootPath, config.defaultNotePath)
config.docsPath = path.resolve(appRootPath, config.docsPath)
config.indexPath = path.resolve(appRootPath, config.indexPath)
config.codimdPath = path.resolve(appRootPath, config.codimdPath)
config.errorPath = path.resolve(appRootPath, config.errorPath)
config.prettyPath = path.resolve(appRootPath, config.prettyPath)
config.slidePath = path.resolve(appRootPath, config.slidePath)
config.constantsPath = path.resolve(appRootPath, config.constantsPath)
config.uploadsPath = path.resolve(appRootPath, config.uploadsPath)
// make config readonly