Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

Commit

Permalink
Simple sinatra handler
Browse files Browse the repository at this point in the history
  • Loading branch information
darkhelmet committed Dec 31, 2010
1 parent 01bf202 commit 82794f2
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions example/sinatra/app.rb
@@ -1,24 +1,7 @@
require 'sinatra'
require 'yajl/json_gem'

get '*' do
'Hello, World!'
# items = request.env.map do |k,v|
# "<li><strong>#{k}</strong>: #{v}</li>"
# end.join("\n")
# %Q{
# <html>
# <head>
# <title>Sinatra Mongrel2 Test</title>
# </head>
# <body>
# <h1>env</h1>
# <ul>
# #{items}
# </ul>
# <hr />
# <h1>Params</h1>
# #{params}
# </body>
# </html>
# }
sleep(5)
request.env.to_json
end

0 comments on commit 82794f2

Please sign in to comment.