require 'webrick'
include WEBrick
s = HTTPServer.new( :Port => 2000 )
class HelloServlet < HTTPServlet::AbstractServlet
  def do_GET(req, res)
    res.body = "hello, world"
    res['Content-Type'] = "text/plain"
  end
end
s.mount("/hello", HelloServlet)
trap("INT"){ s.shutdown }
s.start