Skip to content

Instantly share code, notes, and snippets.

@vangberg
Created December 30, 2010 20:19
Show Gist options
  • Select an option

  • Save vangberg/760243 to your computer and use it in GitHub Desktop.

Select an option

Save vangberg/760243 to your computer and use it in GitHub Desktop.
require "sinatra"
use Rack::Session::Cookie
get "/" do
session["counter"] ||= 0
session["counter"] += 1
"count: #{session["counter"]}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment