Nodejs Book: Chapter 9

In this chapter we take the raw POST data that we uploaded in the previous chapter and parse it to JSON data so that we can handle it easier. In the next chapter we will change our focus to working with JSON data in a more direct fashion.

Nodejs Book: Chapter 8

In this chapter of the Nodejs be continue to expand on the sending data to the server. In this example we create a form on the client side, and send the form via a POST request to the server, to unpack the body contents and return them to the client, so we can see how form data is encoded when sent to the server.

Nodejs Book: Chapter 7

Now that we’ve started to make calls to the server, in this chapter we go over how to upload an image. This consists of taking a file from the client and uploaded it as an http request, and reading the request body on the server and writing the data to a file.

Nodejs Book: Chapter 6

In the previous chapter we wrote a simple Ajax call where we returned the simple expression “Hello World”. In this chapter we add on to the previous example by writing a simple echo function where we provide a Name as a parameter to the server, and have the server reply with “Hello Name”.

Nodejs Book: Chapter 5

In the previous chapter we learned how to create modules to simplify our code. Now that he have a basic grasp on how to serve static files from Nodejs, in this chapter we switch to more learning how to create a more dynamic application server where we handle both static files, and Ajax requests from the client. We start with a simple “hello world” example.

Nodejs Book: Chapter 4

In the previous chapter, we implemented the functionality of a directory index where all of the files in a directory would be listed. As a result of that our code started to get long and messy, so in this chapter we introduce modules to implement specific functionality to organize our code.

Nodejs Book: Chapter 3

In this chapter of the Nodejs book, we implement the functionality of a directory listing for a file server. In the case that the path of a folder is requested and no index.html exists in that directory, then we read the list of all of the files in the directory, and render a page to be returned to the client.

Nodejs Book: Chapter 2

This this chapter of our Nodejs “book” we create a simple file server, that will interpret requests to the server as file paths. The server will then search through the public directory for static files and return them to the http client if they are found.

Nodejs Book: Chapter 1

This this chapter, we go over the basics of the deceptively simple “hello world” server in Nodejs. And go over some of the concepts into why the same message will be returned to the user no matter what url is requested.

Nodejs Book (Abstract)

In 2017 I wrote a small “book” about getting started with Nodejs as an HTTP server. The book has been sitting on my hard drive for the last three years, so I figured if there is nothing better to do with it, then I might as well post it to this blog. To post a bit of background to this book, I should probably explain some of my experience with Nodejs. In 2011 was a student in university getting into server-side programming and I was having trouble of managing the differences between client-side Javascript and server-side PHP. That’s when the first video with Ryan Dahl came out announcing Nodejs.