summaryrefslogtreecommitdiff
path: root/lib/config
diff options
context:
space:
mode:
authorClaudius2018-09-10 22:35:38 +0200
committerWilliButz2018-09-26 21:01:15 +0200
commitbb80bc2292d2841776e8bfd6285f96194d990284 (patch)
tree9ea69de534cd1d977e6d8a886a8f4e576132996f /lib/config
parent825ee4e66e79271c39631f2b9eb059caa8f17bfc (diff)
removing superfluous config parameters for template files
Signed-off-by: Claudius <opensource@amenthes.de>
Diffstat (limited to 'lib/config')
-rw-r--r--lib/config/default.js7
-rw-r--r--lib/config/index.js10
2 files changed, 3 insertions, 14 deletions
diff --git a/lib/config/default.js b/lib/config/default.js
index 6096bce4..5d10ad26 100644
--- a/lib/config/default.js
+++ b/lib/config/default.js
@@ -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',
diff --git a/lib/config/index.js b/lib/config/index.js
index 59db8612..7d059c5c 100644
--- a/lib/config/index.js
+++ b/lib/config/index.js
@@ -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