News for hackers. Stuff that matters.
Re:Basic Node.js Lambda Function Concepts by entropie on Wednesday April 04, 2018 @01:25PM (#16756900)
OT; but can anybody can hint me to a good ressource where to learn more about Promises and how to use them correctly?
Re:Basic Node.js Lambda Function Concepts by marvinpinto on Wednesday April 04, 2018 @01:41PM (#16757049)
I found this pouchdb blog post[1] really helpful when first trying to wrap my head around promise chaining patterns. Highly recommend!

[1]: https://pouchdb.com/2015/05/18/we-have-a-problem-with-promis...

Re:Basic Node.js Lambda Function Concepts by m90 on Wednesday April 04, 2018 @02:14PM (#16757378)
This might sound bonkers at first, but I think I did not really understood promises until I implemented the spec myself (with a lot of studying others' code that is).

It's actually not too time-consuming (I think it took me an afternoon) and there is a test suite covering the entire spec on npm: https://www.npmjs.com/package/promises-aplus-tests so you can just hack away until everything is green.

Re:Basic Node.js Lambda Function Concepts by Altimos on Wednesday April 04, 2018 @02:24PM (#16757476)
Check out this guide: https://scotch.io/tutorials/javascript-promises-for-dummies

The pouchdb blog post linked is really good too!

Re:Basic Node.js Lambda Function Concepts by lakeeffect on Wednesday April 04, 2018 @02:36PM (#16757589)
Re:Basic Node.js Lambda Function Concepts by entropie on Wednesday April 04, 2018 @05:10PM (#16759131)
Thanks everybody, for answering.