hapijs / glue

Server composer for hapi.js
Other
245 stars 62 forks source link

Allow options in plugins... #75

Closed simlevesque closed 7 years ago

simlevesque commented 8 years ago

The plugin allows me to add options to server.register() but I can't set plugin specific options. You don't really support Hapi 15 if you don't allow that.

I'll make a PR.

simlevesque commented 8 years ago

Here is the doc :

http://hapijs.com/api#serverregisterplugins-options-callback

Example :

server.register({
    register: require('plugin_name'),
    options: {
        message: 'hello'
    }
 }, (err) => {

     if (err) {
         console.log('Failed loading plugin');
     }
 });
csrl commented 8 years ago

I don't understand the problem. Nothing has changed in regards to plugins and server.register in hapi v15.

Plugin specific options and register options are supported. Can you provide an example manifest that is failing to behave as you expect?

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.