Skip to content

Instantly share code, notes, and snippets.

@bkvirendra
Created June 3, 2012 16:25
Show Gist options
  • Save bkvirendra/2864079 to your computer and use it in GitHub Desktop.
Save bkvirendra/2864079 to your computer and use it in GitHub Desktop.
Ruby webservice using Sinatra
require 'sinatra.rb'
before do
headers "Access-Control-Allow-Origin" => "*"
end
get '/ping' do
'OK'
end
get '/reverse' do
params[:str1].reverse
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment