Over a million developers have joined DZone.

Runt.rb

·
// A tiny Ruby web server.


#!/usr/bin/env ruby

require "webrick"

s=WEBrick::HTTPServer.new(
        :BindAddress => "localhost",
        :Port => 8080,
        :DocumentRoot => File.dirname($0)+"/"+"www/"
)

trap("INT") { s.shutdown }

s.start
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}