Fix web installer benchpress issue

v1.18.x
Peter Jaszkowiak 7 years ago
parent d47c5a7bb0
commit 2ca1475eee

@ -37,7 +37,16 @@ web.install = function (port) {
winston.info('Launching web installer on port', port); winston.info('Launching web installer on port', port);
app.use(express.static('public', {})); 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('view engine', 'tpl');
app.set('views', path.join(__dirname, '../src/views')); app.set('views', path.join(__dirname, '../src/views'));
app.use(bodyParser.urlencoded({ app.use(bodyParser.urlencoded({

Loading…
Cancel
Save