Nodejs and Promises

The Nodejs platform is founded on a programming paradigm of asynchronous events and callbacks. This can be tricky if you’re not used to it.

Sometimes, you need some order in your life (and code), and that’s where Promises can help. A Promise ensures that an asynchronous function will eventually complete (successfully or not), and when it does, to then run another function.

Check out these two excellent lessons on Promises

Javascript Promises

Promise chains with Node.js

Advertisements
Tagged , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: