hapijs / glue

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

register all js files inside a folder, instead of registering one by one #55

Closed amgohan closed 8 years ago

amgohan commented 8 years ago

did Glue support scanning and register all js inside a folder, especially when there are no options to pass to this plugins. Something like :

registrations: [
    {
         plugins : './server/api/controllers/*.js'
    },
    ....
]

Or is there another elegant solution to do that.

csrl commented 8 years ago

It does not. You'd need to wrap with a your own helper code to populate the registrations array.

amgohan commented 8 years ago

I created a hapi plugin to scan and register hapi methods, take a look : https://github.com/amgohan/hapi-methods-injection

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.