Async / Await in Node.js

The Async / Await functionality introduced into Node.js in v7.10.0 is legitimately a godsend. The Async / Await paradigm works with promises to do exactly what the paradigm implies. It will asynchronously call the function and await it’s response before continuing on with the rest of the function. Previously, you could do this with promise chaining. Passing results from one promise to the next. Where this issue fell apart is when you needed to use the result of Promise 1 in Promise 4. You would need to somehow pass the result of Promise 1 through Promises 2 and 3 in order to use them in promise 4. ...

May 31, 2018 · James D Hughes

Yet Another Stateless Authentication Blog Post for the MEAN stack.

#inb4: this ain’t new. I’m writing this for everyone that wants a slightly more organized approach to express middleware and authentication. I’m writing this because once again I was inspired by how much I adore Node, Express, and all the delights that come from being able to implement my API’s and leverage middlewares. Also, I’m using async / await, which is pretty neat. I’m going to use MongoDB as a datastore it just jives so well with Node. ...

May 5, 2018 · James D Hughes