If we have information stored on disk that we want to serve as web content, we can use the
fs (filesystem) module to load our content and pass it through the
http.createServer callback. This is a basic conceptual starting point to serve static files; as we will learn in the following recipes, there are much more efficient solutions.
We'll need some files to serve. Let's create a directory named
content, containing the following three files:
Add the following code to the HTML file