How can I catch the output of a redis query in node js?

Viewed 131

I am learning nodejs/expressjs and redis and trying to catch the output of a simple query, whether an item is a member of a set of items.

Code example:

const isSet = client.sismember(key, value);
console.log(isSet); 

I am expecting a true of false value for "isSet", and then I would use that in a conditional statement.

Thanks in advance!

0 Answers
Related