You are previewing Node Web Development.

Node Web Development

Cover of Node Web Development by David Herron Published by Packt Publishing
O'Reilly logo

Chapter 5. A Simple Web Server, EventEmitters, and HTTP Clients

Now that we've seen how to create Node applications using the Express web framework, let's dig under the covers into the details of HTTP web server implementation. In this chapter, we'll implement a simple web server that supplies a few of the attributes of real web servers discussed in Chapter 4, Variations on a Simple Application.

It's generally best to let the web application framework take care of details, because the HTTP protocol is complex to implement correctly. So why do we want to implement our own HTTP web server? There are several reasons as follows:

  • Understanding why to choose one framework or another
  • Understanding why a framework does what it does
  • Not every task fits into ...

The best content for your career. Discover unlimited learning on demand for around $1/day.