Skip to content

Instantly share code, notes, and snippets.

@vangberg
Created February 25, 2009 00:13
Show Gist options
  • Select an option

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

Select an option

Save vangberg/69895 to your computer and use it in GitHub Desktop.
require 'sinatra'
enable :sessions
before do
session[:mine] ||= 0
end
get '/foo' do
(session[:mine] += 1).to_s
end
require 'app'
use Sinatra::Application
run lambda {|e| [200, {'Content-Type' => 'text/plain'}, 'Endpoint!']}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment