14

Creating RESTful Web Services

This chapter explains how Node.js can be used to create web services that provide access to data over HTTP requests, which is a key enabler for single-page applications (SPAs). The chapter begins with a basic web service and then incorporates more complex features, such as partial updates and data validation. Table 14.1 puts this chapter in context.

Table 14.1: Putting RESTful web services in context

Question

Answer

What are they?

RESTful web services provide access to data over HTTP requests. Instead of sending data embedded in HTML content, the server responds with “raw” data, usually in JSON format.

Why are they useful?

Web services allow clients to perform data operations, such as querying ...

Get Mastering Node.js Web 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.