The five-line sinatra app on http://www.sinatrarb.com/ is pretty damn impressive:
require 'rubygems' require 'sinatra' get '/hi' do "Hello World!" end
I can do four lines better than that, though:
So what does that get you?
batkin:cholla ben$ ruby -rubygems cholla.rb == Sinatra/0.9.0.4 has taken the stage on 4567 for development with backup from Thin >> Thin web server (v1.0.0 codename That's What She Said) >> Maximum connections set to 1024 >> Listening on 0.0.0.0:4567, CTRL+C to stop 127.0.0.1 - - [03/May/2009 10:13:46] "GET /index.html HTTP/1.1" 200 7 0.0019
Once you decide to add some server-side code, you can simply go in to the sinatra app and add it.