Skip to content

Instantly share code, notes, and snippets.

@mikeebert
Created July 13, 2012 01:35
Show Gist options
  • Select an option

  • Save mikeebert/3102199 to your computer and use it in GitHub Desktop.

Select an option

Save mikeebert/3102199 to your computer and use it in GitHub Desktop.
Start of Sinatra-Warden
require 'sinatra'
require 'warden'
class YourApp < Sinatra::Application
use Rack::Session::Cookie
get "/" do
erb 'index'.to_sym
end
get "/protected_pages" do
erb 'admin_only_page'.to_sym
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment