Skip to content

Instantly share code, notes, and snippets.

@rosenfeld
Created July 23, 2016 13:44
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rosenfeld/8f5663ebe39a2f5b24915853c91f30f7 to your computer and use it in GitHub Desktop.
Sample simple Rack application demonstrating rack_web_console used with rack-webconsole
require 'rack_web_console'
require 'rack-webconsole'
Rack::Webconsole.inject_jquery = true
#Rack::Webconsole.key_code = '39'
use Rack::Webconsole
run ->(env) {
return [404, {}, []] unless env['PATH_INFO'] == '/'
RackConsole.new(binding).call env
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment