Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Composition using Glue? #44

Closed
nelsonic opened this issue Dec 3, 2015 · 9 comments
Closed

Server Composition using Glue? #44

nelsonic opened this issue Dec 3, 2015 · 9 comments

Comments

@nelsonic
Copy link
Member

nelsonic commented Dec 3, 2015

What are the advantages of using glue ? https://github.com/hapijs/glue

@simon-p-r
Copy link

Makes it easier to compose a comprehensive server with multiple connections and numerous plugins. It also exposes access to the server creation life cycle via pre connections and the pre plugins methods.

@nelsonic
Copy link
Member Author

nelsonic commented Dec 3, 2015

@simon-p-r right, but how many people/teams/projects deploying hapi Apps/APIs are actually _using_ glue...?
I'm happy to write up a section on glue but would like to gauge how popular its likely to be...

There were 190k downloads of hapi in the past month:
NPM

But only 11k downloads for glue ... that means fewer than _6% of hapi projects_ ...
NPM
I'm actually a big fan of the declarative style of defining an application in a manifest.json file.
But I'm not a fan of forcing beginners to learn _another_ thing before they can contribute to a project or be productive in their work.

Hence my question: who is _using_ glue...?

@vdeturckheim
Copy link

I make a large use of glue in one of my personal project right now. My back-end app is organized in small components (managed through npm) such as 'auth', 'team and private messaging', 'db management', ...
My final server is actually only composed of a manifest.json and a package.json. I compose it with rejoice and that's all.
I also use glue in each module to forge a server as I need it for testing purpose.

However I do agree it is not a necessary tool for beginners, except, maybe, to promote the idea of composing a hapi server as a collection of, as independents as possible, modules.

At the end of the day glue is just a way to assemble the pieces of a bigger construction in a clearer way than through coding it together (link may die when branch v3 is merged in master in glue repo)

@nelsonic
Copy link
Member Author

nelsonic commented Dec 4, 2015

@vdt can you share link to the personal project you are describing, or is it private?

@vdeturckheim
Copy link

@nelsonic it is actually private (gitlab.com + npm private plan) :/ I'll try to provide examples this week-end in a github repo.

@nelsonic
Copy link
Member Author

nelsonic commented Dec 4, 2015

Ah... GitLab. fair enough.
if you can that would be sweet. thanks.

@vdeturckheim
Copy link

I'll do my best ;) It's definitely on my bucket list.

@vdeturckheim
Copy link

@nelsonic You can take a look at sticky and its plugins. Let me know if you have any comments or questions regarding this.

@FullStackForger
Copy link

Great question @nelsonic! And thanks a lot for the code example @vdeturckheim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants