hydra-express-plugin v0.0.1
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);setHydraExpresscallssetHydra(hydraExpress.getHydra())internally.HydraExpressPlugin.setConfigis 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).
8 years ago