Commit e606697c authored by joel Grenon's avatar joel Grenon

Add capacity to override default options for core plugins

parent 9e6c4683
......@@ -333,10 +333,10 @@ CMBF.prototype.launch = P.method(function(pluginOpts) {
_this.log.debug("Configuring Documentation: Swagger plugin will be loaded with configuration", result.swaggerOpts);
var registerPlugin = P.promisify(server.register, server);
return P.join(
registerPlugin({register: require('inert'), options: pluginOpts}),
registerPlugin({register: require('vision'), options: pluginOpts}),
registerPlugin({register: require('inert'), options: _.defaults(config.get('plugins:inert:options',{}), pluginOpts)}),
registerPlugin({register: require('vision'), options: _.defaults(config.get('plugins:vision:options',{}), pluginOpts)}),
registerPlugin({register: require('hapi-swagger'), options: result.swaggerOpts}),
registerPlugin({register: require('chairo'), options: pluginOpts })
registerPlugin({register: require('chairo'), options: _.defaults(config.get('plugins:chairo:options',{}), pluginOpts) })
);
});
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment