Summary

In this chapter, we have seen how to expose the standard Node.js callback interface in our own modules. We have made use of promises to produce more readable asynchronous code. Finally, we have seen how we can use promises together with standard Node.js callbacks.

Now that we can implement our own asynchronous APIs, we can expand on our application and start making use of other libraries that provide asynchronous interfaces. In the next chapter, we will make use of this to introduce persistent storage to our application.

Get Learning Node.js for .NET Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.