6. Expanding Your Web Server
In this last chapter of Part II, “Learning to Run,” you expand the web server a little bit with some key new functionality; you learn how to serve up static content such as HTML pages, JavaScript files, cascading style sheets, and even image files. Armed with this knowledge, you turn your focus away from the server and look at programming the client.
In the new Node.js world of programming websites, you’re going to migrate from the traditional model of generating HTML on the server before sending it down to clients and instead have your server serve up only static files or JSON. The web browser can then use AJAX calls along with template libraries to generate pages on the fly as the user navigates around the site. ...
Get Learning Node.js, Second Edition 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.