Created
January 27, 2012 02:40
-
-
Save aghecht/1686634 to your computer and use it in GitHub Desktop.
Sinatra App for Demo JavaScript
This file contains 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
require 'sinatra' | |
require 'erubis' | |
require 'json' | |
get '/index' do | |
erb :index | |
end | |
get '/data.json' do | |
sleep 10 | |
content_type :json | |
{ | |
:key1 => 'value1', | |
:key2 => 'value2' | |
}.to_json | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment