use node-redis with node 8 util.promisify

前端 未结 3 622
借酒劲吻你
借酒劲吻你 2021-02-05 02:19

node -v : 8.1.2

I use redis client node_redis with node 8 util.promisify , no blurbird.

the callback redis.get is ok, but promisify type get error message

3条回答
  •  自闭症患者
    2021-02-05 02:48

    changing let get = util.promisify(client.get);

    to let get = util.promisify(client.get).bind(client);

    solved it for me :)

提交回复
热议问题