5.5 Summary
The Node.js HTTP server is one of the reasons for the success of Node.js. In just a few lines, you can implement a web server capable of delivering static content to a client. Add a few more lines, and you already have a dynamic solution that can handle data from the client and generate output based on it.
If you work directly with the http module, you should definitely make the extra effort and choose the secure variant with the https module. All you need to do that is a valid certificate. This means that communication between client and server is encrypted, which both increases your users’ trust in your application and improves search engine ratings.
With the http2 module, the Node.js platform has been enriched by another module. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access