Shortly after the release of Nodejs came the release of Express, and I had a few friends who started using Express and being able to easily use Nodejs even though they personally admitted they had no idea what was going on. I resisted the temptation to start using Express, as I didn’t like the idea of a “black box” that takes care of everything for you. I really wanted to understand the fundamental mechanics of Nodejs, and what was going on, and then deciding on whether to use something like Express from there. As a side note, after putting in the investment I do use Express, and enjoy it a lot. But I still appreciate the effort I put into trying to learn Nodejs “from the ground up”, and that’s what I hope to share in this “book”.
As a note, this book has not been through an editor so there could be potential mistakes. Since we have comments disabled on this site, if you would like provide feedback, you can tweet me over at @WsdCollins, with a link to the page and you’re comment. And I can go ahead and add the tweet into a given page along with the correction.
One of the caveats of creating a web server in Nodejs is that we define a process which defines the web server itself, along with the logic that runs on top of it. This concept is not unique to Nodejs in the least, but it does contrast with other languages such as PHP where either Apache or Nginx serves as a web server, and PHP is only run on files ending with the file extension of “.php”. Because we are defining a process to act as a web server, and implement logic on top of it, that it is extremely beneficial when working with Nodejs to understand the fundamental concepts and standards that the web is based off of.
In this book we will create functional web server using Nodejs and describe the web standards and background knowledge for each concept of implementing our web server.