From 2ca1475eee8f4dbf6ef784be01e75a5251978556 Mon Sep 17 00:00:00 2001 From: Peter Jaszkowiak Date: Wed, 13 Sep 2017 13:50:00 -0600 Subject: [PATCH] Fix web installer benchpress issue --- install/web.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/install/web.js b/install/web.js index 58767b776a..758e2f3c57 100644 --- a/install/web.js +++ b/install/web.js @@ -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({