How do I issue HGET/GET command for Redis Database via Node.js?

前端 未结 2 950
长情又很酷
长情又很酷 2021-02-01 08:14

I am using Node.js and a Redis Database . I am new to Redis .

I am using the https://github.com/mranney/node_redis driver for node.

Initialization code -

2条回答
  •  别跟我提以往
    2021-02-01 08:41

    I found the answer -

    A callback function is needed for getting the values .

    client.hget("users:123", "name", function (err, reply) {
    
        console.log(reply.toString());
    
        });
    

提交回复
热议问题