mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 12:01:17 +01:00
using views_dir config
This commit is contained in:
1
app.js
1
app.js
@@ -101,6 +101,7 @@ function start() {
|
||||
nconf.set('url', nconf.get('base_url') + (nconf.get('use_port') ? ':' + nconf.get('port') : '') + nconf.get('relative_path'));
|
||||
nconf.set('upload_url', path.join(path.sep, nconf.get('relative_path'), 'uploads', path.sep));
|
||||
nconf.set('base_dir', __dirname);
|
||||
nconf.set('views_dir', path.join(__dirname, 'public/templates'));
|
||||
|
||||
winston.info('Time: ' + new Date());
|
||||
winston.info('Initializing NodeBB v' + pkg.version);
|
||||
|
||||
@@ -130,7 +130,7 @@ module.exports = function(app, data) {
|
||||
app.configure(function() {
|
||||
app.engine('tpl', templates.__express);
|
||||
app.set('view engine', 'tpl');
|
||||
app.set('views', path.join(__dirname, '../../public/templates'));
|
||||
app.set('views', nconf.get('views_dir'));
|
||||
|
||||
app.use(express.compress());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user