@xroom.app/redis-wrapper
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Wrapper over redis package

Installation

Run from command line

npm i @xroom.app/redis-wrapper

Usage example

const { getGeneralRedisMethods, getHashMapRedisMethods } = require('@xroom.app/redis-wrapper/wrappers')
const { getRedisClient } = require('@xroom.app/redis-wrapper')

const url = 'redis://127.0.0.1:6379'
const dbNumber = 0

const clientPromise = getRedisClient(url, dbNumber)

const generalMethods = getGeneralRedisMethods(clientPromise)

const hashMapMethods = getHashMapRedisMethods(clientPromise)

const runTask = (async () => {
  await hashMapMethods.hset('myMap', 'foo', 'bar')

  const keys = await generalMethods.keys('my')

  console.log(keys.includes('myMap'))
})

runTask()

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @xroom.app/redis-wrapper

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

11.3 kB

Total Files

12

Last publish

Collaborators

  • xroom.app