pnxtech / hydra-express

A module which wraps Hydra and ExpressJS into a library for building distributed applications - such as microservices
MIT License
184 stars 38 forks source link

Redis error when use testMode with true (to use redis-mock) #123

Closed leonardorifeli closed 5 years ago

leonardorifeli commented 5 years ago

We opened an issue in hydra project (https://github.com/flywheelsports/hydra/issues/207) to know how to disable Redis connection to a small project.

Looking at the hydra documentation I find'd the testMode property and when that property is enabled is possible to use redis-mock. But, when using that enabled property, we receive this error:

node_modules/hydra/index.js:848
              .select(HYDRA_REDIS_DB)
               ^

TypeError: this.redisdb.multi(...).select is not a function

My hydra-express version is 1.5.5

@cjus any idea?

Thanks.

leonardorifeli commented 5 years ago

Sorry @cjus.

I'm fix that. The error is in my project (routes).