Closed jchoi2x closed 7 years ago
Just do whatever you need to do in the compose callback. Like calling server.register(veryLastPlugin). Also, the plugins are loaded in array order, so you can also just place your plugin last in the registrations array.
Glue.compose(manifest, options, (err, server) => {
if (err) {
throw err;
}
// do whatever you want here, before calling server.start. eg. server.register or server.decorate
server.start(() => {
console.log('hapi days!');
});
});
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.
I need to write a plugin that is registered last, after all
server-methods
are added, without having to explicitly know exactly which plugins to list as dependencies. I see that there is a way to addpreRegister
but there is no way to add apostRegister
; which still isn't how I'd like to use the plugin .I would like to use something like the following in the plugin, but there isn't a
server event
forpostRegister
Adding the functionality is no problem, but if I DO make a PR for this would you guys consider merging it?