siwi-redis

redis 简单封装

Usage no npm install needed!

<script type="module">
  import siwiRedis from 'https://cdn.skypack.dev/siwi-redis';
</script>

README

siwi-redis

基于 redis的简单封装

const redis = require('siwi-redis')
class Test {
    constructor() {
        this.init()
    }
    async init () {
        const options = {host: '192.168.0.102'}
        const client = await redis.createClient(options)
        const res = await client.hsetAsync('test', 'test', 'test')
        console.log(res)
    }
}

module.exports = new Test()