Skip to content

Instantly share code, notes, and snippets.

@samueldowens
Created October 21, 2013 17:50
Show Gist options
  • Save samueldowens/7087991 to your computer and use it in GitHub Desktop.
Save samueldowens/7087991 to your computer and use it in GitHub Desktop.
simple sinatra config.ru
# # config.ru
require 'sinatra'
get '/' do
"Hello Sinatra!"
end
get '/hello/:name' do |n|
"Hello #{n}!"
end
get '/wildcard/*' do
request.inspect
end
error 404 do
"OMG, 404!"
end
get '/breakit' do
500
end
run Sinatra::Application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment