You are on page 1of 5

SinatraRb.

com

Sinatra
Overview

 Microframework for web apps


 Acts as standalone controller
 Rack-compatible
 Easy deployment with Passenger
Sample

require ‘rubygems’
require ‘sinatra’

get ‘/hello’ do
“Wilkommen!”
end
Request Handling

get ‘/subscribe’
haml :subscription_form
end

post ‘/subscribe’
@email = params[:email]
end
Ta-da!

You might also like