Ruby Web Server

Overview

Very simple Ruby-based webserver. Will read a file (index.html) and output the contents, along with the necessary headers.

Note: This is a project for learning, not practical use.

Pre-requisites

  • Ruby 1.8.7+ (not doing anything too complicated here)

How to Run

Start server with:

ruby server.rb

Then visit this in your browser:

http://localhost:2345

or curl:

curl -i http://localhost:2345

TO DO

  • Allow port to be set as a parameter.
  • Handle different file types (jpg, png, gif, zip)

References