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

add support for preConnection and preRegister options handlers #3

Closed
csrl opened this issue Nov 26, 2014 · 9 comments
Closed

add support for preConnection and preRegister options handlers #3

csrl opened this issue Nov 26, 2014 · 9 comments
Assignees
Labels
feature New functionality or improvement
Milestone

Comments

@csrl
Copy link
Contributor

csrl commented Nov 26, 2014

It would be useful to pass function handlers in the Glue.compose() options in order to manipulate the server at each stage. Example:

var Glue = require('glue');
var options = {
  relativeTo: __dirname,
  preConnection: function (server, next) {
     next();
  },
  preRegister: function (server, next) {
     server.app.shared = someValue;
     next();
  },
};
Glue.compose(require("./manifest.json"), options, function (err, server) {
  server.start();
});

The idea being that it would be possible to set up the server prior to loading plugins.

Is this something you'd consider supporting?

Thanks.

@hueniverse
Copy link
Contributor

glue's main use case is the rejoice command line utility. Since rejoice works off json files, passing functions is not possible. I personally don't have an objection to this idea but I would not be adding any additional features. It's time for some else to take over this module and drive it forward.

@csrl
Copy link
Contributor Author

csrl commented Nov 27, 2014

@hueniverse

I've generated a series of patches:

https://github.com/csrl/glue/compare/hapijs:master...master

If it looks interesting to you, I can create a pull request. Or if you'd like something changed (compose option names?) let me know.

@hueniverse
Copy link
Contributor

@csrl would you like to take over this module as lead maintainer?

@csrl
Copy link
Contributor Author

csrl commented Nov 27, 2014

I've read through hapi's governance doc. Given this module's limited scope and my own need/use of it, I expect I can commit to the potential time requirements.

Thank you for considering me. I accept.

@hueniverse
Copy link
Contributor

What's your npm account?

@csrl
Copy link
Contributor Author

csrl commented Nov 27, 2014

newly minted: csrl

@hueniverse
Copy link
Contributor

@csrl I sent an email to the address listed with a question...

@hueniverse
Copy link
Contributor

You now have npm publish rights as well as contrib rights on the repo. Please read the documents at hapijs/contrib as well as hapijs/hapi/docs to understand the workflow. The most important parts are to make sure every issue is labeled, if you are working on something or taking action as maintainer (even just closing a question) assign it to yourself, and to manage milestones carefully.

@csrl csrl self-assigned this Dec 3, 2014
@csrl csrl added this to the 2.0.0 milestone Dec 3, 2014
@csrl csrl closed this as completed in 9ef3c1c Dec 3, 2014
@Marsup Marsup added feature New functionality or improvement and removed request labels Sep 21, 2019
@lock
Copy link

lock bot commented Jan 9, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

3 participants