0.0.1 • Published 7 years ago

hydra-express-plugin v0.0.1

Weekly downloads
160
License
MIT
Repository
-
Last release
7 years ago

Hydra Express Plugins

HydraExpressPlugin extends HydraPlugin. See the Hydra plugin documention for more details.

Some caveats for HydraExpressPlugin vs HydraPlugin:

  1. In HydraExpressPlugin, setHydraExpress(hydraExpress) is called instead of setHydra(hydra); setHydraExpress calls setHydra(hydraExpress.getHydra()) internally.

  2. HydraExpressPlugin.setConfig is called with the service-level config rather than the hydra-level config like HydraPlugin.setConfig. HydraExpressPlugin.setConfig(config) calls super.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).