Friday 24 March 2017

Node_Redis Wrapper - Inspired From Callback Hell

Today at work I found myself in callback hell with some legacy node code.It appears node_redis doesn't have first call promise support without bluebird decoration. This being said bluebird is a completely viable option assuming you want to append all your commands with "Async". I personally didn't want to append all my commands... It felt like code noise.So I wrote this library that decorates the redis commands with promises. I would prefer to make the decorator less invasive to the underlying api, but for a single night's work, I will live with it.If anyone else could possibly find this useful, shoot me a star or an up arrow and I will put more effort into making it a viable option around the existing implementation.http://ift.tt/2n0t7DN

Submitted March 24, 2017 at 05:46AM by shadestone

No comments:

Post a Comment