Plugins for Hydra Express microservices
Last updated 3 years ago by emadum .
MIT · Original npm · Tarball · package.json
$ cnpm install hydra-express-plugin 
SYNC missed versions from official npm registry.

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).

Current Tags

  • 0.0.1                                ...           latest (3 years ago)

1 Versions

  • 0.0.1                                ...           3 years ago

Copyright 2014 - 2017 © taobao.org |