7. Implementing HTTP Services in Node.js

One of the most important aspects of Node.js is the ability to implement HTTP and HTTPS servers and services very quickly. Node.js provides the http and https modules out of the box, and they give you a basic framework to do just about anything you might need to do from an HTTP and HTTPS standpoint. In fact, it is not difficult to implement a full webserver using just the http module.

However, the http module is pretty low level. You will likely use a different module, such as express, to implement a full-on webserver. The http module doesn’t provide calls to handle routing, cookies, caching, etc. In Chapters 18 and 19, you will see the advantages the express module provides.

What you will more likely ...

Get Node.js, MongoDB, and AngularJS 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.