Merge pull request #5929 from NodeBB/benchpress-webinstall

Fix web installer benchpress issue
v1.18.x
Julian Lam 8 years ago committed by GitHub
commit cea4b553fc

@ -37,7 +37,16 @@ web.install = function (port) {
winston.info('Launching web installer on port', port);
app.use(express.static('public', {}));
app.engine('tpl', Benchpress.__express);
app.engine('tpl', function (filepath, options, callback) {
async.waterfall([
function (next) {
fs.readFile(filepath, 'utf-8', next);
},
function (buffer, next) {
Benchpress.compileParse(buffer.toString(), options, next);
}
], callback);
});
app.set('view engine', 'tpl');
app.set('views', path.join(__dirname, '../src/views'));
app.use(bodyParser.urlencoded({

Loading…
Cancel
Save