Skip to content

Instantly share code, notes, and snippets.

@aghecht
Created January 27, 2012 02:40
Show Gist options
  • Save aghecht/1686634 to your computer and use it in GitHub Desktop.
Save aghecht/1686634 to your computer and use it in GitHub Desktop.
Sinatra App for Demo JavaScript
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