I won’t even attempt to cover all there is to know about Node on an introductory level in one chapter, so I’m focusing primarily on the interesting bits for the relative newbie. For more in-depth coverage, I’m going to toot my own horn and recommend my book, Learning Node (O’Reilly).
At a minimum, this chapter does expect that you have Node installed in whatever environment you wish, and are ready to jump into the solution examples.
Responding to a Simple Browser Request
You want to create a Node application that can respond to a very basic browser request.
Use the built-in Node HTTP server to respond to requests:
// load http module
// create http server
// content header
// write message and signal communication is complete
'Server running on 8124/'
The simple text message web server response ...