Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the issue with the registering of HAPI v17 plugins #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed the issue with the registering of HAPI v17 plugins
kt-weyert committed Apr 1, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 869fbe4cac7c5d77ef2c0b431fe2cb23f5c0d6c5
6 changes: 5 additions & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
@@ -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') {