Skip to content

Instantly share code, notes, and snippets.

@bluesalt
Created December 3, 2012 15:32
Show Gist options
  • Save bluesalt/4195742 to your computer and use it in GitHub Desktop.
Save bluesalt/4195742 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'sinatra'
configure do
set :counter, 0
end
get '/' do
"#{settings.counter}"
end
put '/update' do
settings.counter = params[:v].to_i
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment