Wednesday 27 January 2016

Using ES7 with ExpressJS ?

I recently tried the new Async Await feature and was amazed about how it transformed my old unreadable code in something really beautiful.I used it in a simple Node.js script and used bluebird.promisifyAll(someOldCallbackBasedModule) to transform all my callback based libraries and module in Promises so I could use await on them.Now my question is that if it is possible to use this in Express ? I know there is Koa2 that has it, but I already have an express based backend and want for example to use async await instead of promise.then() in some of my middlewares and keep my other old middlewares as they are.Is this doable ?

Submitted January 28, 2016 at 04:57AM by skini26

No comments:

Post a Comment