hapijs / glue

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

Loading manifest into an existing server #16

Closed jeffm13 closed 9 years ago

jeffm13 commented 9 years ago

Any chance of an alternate mechanism for glue to load a manifest into an existing server object? My use case is for a 'reusable' server that forces consistent log, ops, security, and documentation plugins. One way to do that might be to 'preload' a number of plugins into a server, and then load a manifest on top of the existing server. Composition of this 'standard' server would then consist of specific API plugins and their requirements. There are other ways to do this, but I thought I'd ask...

csrl commented 9 years ago

I'd be open to a pull request for this. Something as simple as providing the server to use in the compose options parameter might work. I'd be interested in seeing alternative approaches as well.

jeffm13 commented 9 years ago

I handled my initial use case with a preplugin function. But it was still too brittle. So I think I'm leaning toward an alternate loader--similar to rejoice, but it will enforce a default security scheme and merge the provided manifest with a manifest containing 'standard' plug-ins prior to loading with glue.

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.