Static resources
Everything you’ve learned so far in this book, up to the previous exercise, is sufficient to build web applications and dynamic websites; you just need to put all the pieces together.
What you’ve been doing in this chapter is returning messages that are different but all hardcoded as strings. Even dynamic messages have been based on templates hardcoded in the source file of the exercises and activities. Now, let’s consider something. In the case of the first hello world
server, the message never changed. If we wanted to modify the message and return a Hello galaxy
message, we would have to change the text in the code and then recompile and/or run the server again. What if you wanted to sell your simple “hello” server and give the option to everybody to specify a custom message? Of course, you should give the source code to everybody so that they can recompile and run the server.
Although you might want to embrace open source...