Summary

In this chapter, we looked at Express, a Node.js web application framework, in greater detail. You learned that Express is an extremely flexible and unopinionated web framework built on top of Node.js HTTP services.

At its core, Express provides access to a request, response, application, and router objects. Using these objects, we can manipulate web requests and respond in a sophisticated manner.

Using Express predominantly means writing or using middleware plugins, through which requests flow. We learned to use these plugins, and we wrote some utility middleware of our own. We examined routing in detail, and used a resourceful routing plugin to start to build a RESTful API for our SPA. We made the API flexible, capable of responding with ...

Get Mastering JavaScript Single Page 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.