Chapter 3. Creating an API

No matter how sophisticated your backend is, it will most likely be of no use unless you can make its services available to your clients in some way. The most common way to do so is through an Application Programming Interface (API)—a set of well-defined access methods for your backend. Through this, you allow clients to request data, perform calculations, and request other services offered by it.

In this chapter, we will look at how to construct such an API according to the widely used Representational State Transfer (REST) architecture. We will cover the theoretical basics of REST and then see how to implement its condensed version using Node.js according to our needs. We will round up by accessing the API via a REST ...

Get Learning Node.js for Mobile Application Development 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.