Skip to content

Instantly share code, notes, and snippets.

@aaronpk
Created January 6, 2014 07:28
Show Gist options
  • Select an option

  • Save aaronpk/8279416 to your computer and use it in GitHub Desktop.

Select an option

Save aaronpk/8279416 to your computer and use it in GitHub Desktop.
example of mixing jsonatra with Sinatra
class API < Jsonatra::Base
get '/' do
{
hello: 'world'
}
end
end
map '/' do
run Web
end
map '/api' do
run API
end
class Web < Sinatra::Base
get '/' do
erb :index
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment