I am currently working with the node-redis library, which seems to be using a promise approach. Some old articles (2021) I have been following use an older callback approach.
I am curious about the difference between
client.set('Foo', 'Bar', function(err, reply) {
console.log(reply);
// Follow on logic using reply
});
and
let reply = await client.set('Foo', 'Bar');
// Follow on logic using reply
What reasoning is there to use promises instead now?