Created
December 18, 2008 21:29
-
-
Save rtomayko/37668 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App1 < Sinatra::Base | |
set :views, "/path/to/views" | |
set :public, "/path/to/static/files" | |
def strong(text) | |
"<strong>#{text}</strong>" | |
end | |
get '/' do | |
strong "Hello World" | |
end | |
end | |
class App2 < Sinatra::Base | |
set :views, "/path/to/more/views" | |
set :public, "/path/to/more/static/files" | |
def em(text) | |
"<em>#{text}</em>" | |
end | |
get '/' do | |
em "Hello World" | |
end | |
end | |
class Middleware < Sinatra::Base | |
get '/foo/bar' do | |
@app.call(env) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment