@purista/redis-config-store
v1.11.0
Published
State store with redis as database
Downloads
28
Readme
@purista/redis-config-store
A config store for using redis as storage.
Config values are stored as stringified JSON in the redis database.
By default `get
const config = {
url: 'redis://alice:[email protected]:6380'
}
const store = new RedisConfigStore(config)
await store.setConfig('configKey',{ myConfig: 'value' })
let value = await store.getConfig('configKey')
console.log(value) // outputs: { configKey: { myConfig: 'value' }}
await store.removeConfig('configKey')
value = await store.getConfig('configKey')
console.log(value) // outputs: undefined
See documentation of underlaying redis lib package for detailed configuration options - NODE-REDIS.
Visit purista.dev
Follow on Twitter @purista_js
Join the Discord Chat