Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (23 sloc) 791 Bytes
# Usage: bundle exec rackup examples/
# Visit: http://localhost:9292/flipper in browser.
require 'pp'
require 'pathname'
root_path = Pathname(__FILE__).dirname.join('..').expand_path
lib_path = root_path.join('lib')
require 'flipper-ui'
require 'flipper/adapters/memory'
Flipper.register(:admins) { |actor| actor.admin? }
adapter ={})
flipper =
flipper[:logging].enable flipper.random(5)
flipper[:new_cache].enable flipper.actors(15)
use Flipper::UI::Middleware, flipper
run lambda { |env|
[200, {'Content-Type' => 'text/html'}, ['Go here for <a href="/flipper">Flipper!</a>']]
Something went wrong with that request. Please try again.