From 869fbe4cac7c5d77ef2c0b431fe2cb23f5c0d6c5 Mon Sep 17 00:00:00 2001 From: Weyert de Boer Date: Sun, 1 Apr 2018 23:41:11 +0100 Subject: [PATCH] Fixed the issue with the registering of HAPI v17 plugins --- lib/server.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/server.js b/lib/server.js index 2e423f4..5db83d1 100644 --- a/lib/server.js +++ b/lib/server.js @@ -7,7 +7,11 @@ module.exports = { app.log.debug('trailpack-hapi: registering', app.config.get('web.plugins').length, 'plugins') - //await server.register(app.config.get('web.plugins')) + const plugins = app.config.get('web.plugins'); + for (var i=0; i < plugins.length; i++) { + const plugin = plugins[i]; + await server.register(plugin); + } await server.register(require('inert')) if (typeof app.config.get('web.onPluginsLoaded') === 'function') {