Skip to content

Instantly share code, notes, and snippets.

@samueldowens
Created October 21, 2013 17:50

Revisions

  1. samueldowens created this gist Oct 21, 2013.
    25 changes: 25 additions & 0 deletions config.ru
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    # # 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