Skip to content

A redis client tools for nodejs and want to look for a girlfriend...

License

Notifications You must be signed in to change notification settings

bluedapp/ai-redis-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ai-redis-client

npm version

A redis client tools for nodejs and want to look for a girlfriend...

Installation

$ npm i ai-redis-client

Usage

const redisClient = key => {
  // https://www.npmjs.com/package/@blued-core/qconf
  return createRedisClient({ key, option: qconf })()

  // or
  return createRedisClient({ master: ['127.0.0.1:6379'] }, key)()
}

async function getTest () {
  const userRedis = redisClient('user')

  const res = await userRedis.hgetall('u:113').catch(err => {
    console.error(err, { tips: 'test -> hgetall error' })
  })

  console.log(res)

  return res
}

Options

// options
interface Config {
  key?: string
  time?: number
  option: any
}

interface Redis {
  master: Array<string>
  password?: string
  db?: number
}

License

MIT License

About

A redis client tools for nodejs and want to look for a girlfriend...

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published