Pure ruby http server implementation for training, self-educating, and fun, of course!
- Supports
GET
,HEAD
,POST
andDELETE
methods - Determines MIME types using built-in OS
file
command - Can return
200
,400
,403
and404
error codes - No dependencies
Run file http_server.rb
with ruby and web server will run on port 8080 with document root in current directory.
Require file http_server.rb
from your code, and run server with HttpServer.new(address, port, document_root)
Run rake test
to run the test suite.