1.0.4 • Published 5 years ago
@thealmondtree/redis v1.0.4
The Almond Tree Redis wrapper
Package that serves as a driver Redis connections.
It is built with Typescript and NodeJS redis package, but, thanks to bluebird, has the same methods as the original package but ended with Async and returning promises, i.e:
cache.getAsync('redisKey').then(res => { console.log(res) })
Installation
npm i @thealmondtree/redis
Exports
This package exports an factory function that when passed the config object returns an instantiated connection to redis object
Config Options
Property Name | Property Type | Required | Default |
---|---|---|---|
host | string | yes | |
port | number | yes | |
monitor | boolean | no | false |
shouldTrustErrors | boolean | no | false |
Notes
The shouldTrustErrors is there to allow for the driver to expect errors in connection and not break the node process if something goes wrong, use with caution.