The main job of a web server is to listen on a specific port, handle incoming requests for URLs and figure out what to return back.
Iteratively build up your own web server. We'll be doing some of this together in class, but you can get a head-start and a deeper understanding!
A first step would be to write a program that runs on the command line and listens via raw_input
for a user-typed keyword. It then looks up a HTML file in a directory depending on the keyword entered, and returns the text of that file back. The interaction would look something like this:
Welcome to my web server! Enter the route you want: