Chapter 7. The web server
This chapter covers
This chapter discusses the logic and code a server needs to support an SPA. It also provides a good introduction to Node.js. If after reading this chapter you’re really excited and want to build out a fully production-ready application using Node.js, we suggest checking out the book Node.js in Action (Manning 2013).
An SPA moves much of the business logic found on the server in a traditional website to the browser. But we still need some server Ying to match the browser client Yang. There are areas where the web server must be involved to achieve a desired effect—for example, security—or where the server is better suited to the task than the client. The most common responsibilities of an SPA web server include authentication and authorization, data validation, and data storage and synchronization.