hydra-express-plugin
v0.0.1
Published
Plugins for Hydra Express microservices
Downloads
173
Readme
Hydra Express Plugins
HydraExpressPlugin
extends HydraPlugin
. See the Hydra plugin documention for more details.
Some caveats for HydraExpressPlugin
vs HydraPlugin
:
In
HydraExpressPlugin
,setHydraExpress(hydraExpress)
is called instead ofsetHydra(hydra)
;setHydraExpress
callssetHydra(hydraExpress.getHydra())
internally.HydraExpressPlugin.setConfig
is called with the service-level config rather than the hydra-level config likeHydraPlugin.setConfig
.HydraExpressPlugin.setConfig(config)
callssuper.setConfig(config.hydra)
internally.
Make sure to call super.setHydraExpress
or super.setConfig
if you're extending HydraExpressPlugin
, or otherwise ensure that the HydraPlugin
methods get called with the appropriate arguments.
See the HydraExpressLogger
plugin for an example of a plugin that registers Express middleware (look at onServiceReady
).