hapipal / boilerplate

A friendly, proven starting place for your next hapi plugin or deployment
https://hapipal.com
184 stars 26 forks source link

Update to work with node v4 and hapi 11 #4

Closed mattboutet closed 8 years ago

mattboutet commented 8 years ago

Pretty trivial, main thing is to register inert and vision explicitly.

devinivy commented 8 years ago

Ah, thanks for the update! Haven't gotten to test this out– but just making sure you don't think they need to be registered before hapi-swagger.

mattboutet commented 8 years ago

They seem to work just fine when registered after hapi-swagger. I hadn't even considered that registration order could be an issue.

devinivy commented 8 years ago

Registration happens serially, so if hapi-swagger doesn't register vision on its own and tries to use server.view() before vision is loaded, then you'll get an undefined is not a function. Looks like hapi-swagger deals with this correctly by using server.view() after all plugins are registered.

Can we additionally upgrade joi to 7.x.x as part of this PR? There should be no breaking changes– it's just the ES6 version.

devinivy commented 8 years ago

U rock. Giving 'er a quick test now, then mergey-merge!